summarylogtreecommitdiffstats
path: root/dustforce-dustmod
diff options
context:
space:
mode:
authorJoseph Lansdowne2017-07-08 15:17:14 +0100
committerJoseph Lansdowne2017-07-08 15:17:14 +0100
commita34557a400bd0d4e41fc4c287f5f742802d2769a (patch)
treed8b0e92fb7d468cc577b57efee1a19fdc0eb391b /dustforce-dustmod
parent090060d5aed8d31bc11570b28362fe87f5471fba (diff)
downloadaur-a34557a400bd0d4e41fc4c287f5f742802d2769a.tar.gz
7.6.1
no longer supports upstream auto-update
Diffstat (limited to 'dustforce-dustmod')
-rwxr-xr-xdustforce-dustmod27
1 files changed, 27 insertions, 0 deletions
diff --git a/dustforce-dustmod b/dustforce-dustmod
new file mode 100755
index 00000000000..4ad7fdb2419
--- /dev/null
+++ b/dustforce-dustmod
@@ -0,0 +1,27 @@
+#! /usr/bin/env sh
+
+# Dustmod segfaults when it can't write to its install dir, so it's horrible
+# hack time: create a temp dir, symlink all the game files to it, and run from
+# there
+
+temp_dir=
+
+cleanup () {
+ test -n "$temp_dir" && rm -rf "$temp_dir"
+ exit "$1"
+}
+trap 'cleanup 1' INT TERM
+
+
+temp_dir="$(mktemp -d)" || cleanup 1
+cd "$temp_dir"
+for f in /opt/dustforce-dustmod/*; do
+ if [ "$(basename "$f")" = "dustmod.bin.x86_64" ]; then
+ cp "$f" .
+ else
+ ln -s "$f" || cleanup 1
+ fi
+done
+
+./dustmod.bin.x86_64
+cleanup "$?"