diff options
author | Joseph Lansdowne | 2017-07-08 15:17:14 +0100 |
---|---|---|
committer | Joseph Lansdowne | 2017-07-08 15:17:14 +0100 |
commit | a34557a400bd0d4e41fc4c287f5f742802d2769a (patch) | |
tree | d8b0e92fb7d468cc577b57efee1a19fdc0eb391b /dustforce-dustmod | |
parent | 090060d5aed8d31bc11570b28362fe87f5471fba (diff) | |
download | aur-a34557a400bd0d4e41fc4c287f5f742802d2769a.tar.gz |
7.6.1
no longer supports upstream auto-update
Diffstat (limited to 'dustforce-dustmod')
-rwxr-xr-x | dustforce-dustmod | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/dustforce-dustmod b/dustforce-dustmod new file mode 100755 index 000000000000..4ad7fdb24196 --- /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 "$?" |