summarylogtreecommitdiffstats
path: root/dfhack.sh
diff options
context:
space:
mode:
authorChristian Krause2016-07-01 01:18:15 +0200
committerChristian Krause2016-07-01 01:18:15 +0200
commit2837b912ca0588bcb5918cba6b6ff33abcd03061 (patch)
tree86e0d6254ecfae8cce95e953eca3ffd2a5493254 /dfhack.sh
downloadaur-2837b912ca0588bcb5918cba6b6ff33abcd03061.tar.gz
dfhack-bin-0.43.03-1
Diffstat (limited to 'dfhack.sh')
-rw-r--r--dfhack.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/dfhack.sh b/dfhack.sh
new file mode 100644
index 00000000000..0acc659db55
--- /dev/null
+++ b/dfhack.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+# check for dwarffortress user directory
+if [[ ! -d ~/.dwarffortress ]] ; then
+ mkdir -p ~/.dwarffortress/data
+
+ ln -s /opt/dwarffortress/raw ~/.dwarffortress/raw
+ ln -s /opt/dwarffortress/libs ~/.dwarffortress/libs
+ cp -rn /opt/dwarffortress/data/init ~/.dwarffortress/data/init
+
+ for link in announcement art dipscript help index initial_movies movies shader.fs shader.vs sound speech ; do
+ cp -r /opt/dwarffortress/data/$link ~/.dwarffortress/data/$link
+ done
+fi
+
+# check for dfhack user directory
+if [[ ! -d ~/.dwarffortress/hack ]] ; then
+ ln -s /opt/dwarffortress/hack ~/.dwarffortress/hack
+ ln -s /opt/dwarffortress/stonesense ~/.dwarffortress/stonesense
+ ln -s /opt/dwarffortress/dfhack ~/.dwarffortress/dfhack
+ ln -s /opt/dwarffortress/dfhack-run ~/.dwarffortress/dfhack-run
+ ln -s /opt/dwarffortress/dfhack.init-example ~/.dwarffortress/dfhack.init-example
+ cp -r /opt/dwarffortress/dfhack-config ~/.dwarffortress/dfhack-config
+
+ cp ~/.dwarffortress/dfhack.init{-example,}
+fi
+
+# workaround for bug in Debian/Ubuntu SDL patch
+export SDL_DISABLE_LOCK_KEYS=1
+
+cd ~/.dwarffortress
+exec ./dfhack "$@"