blob: 0acc659db555b281577e93654a6e3167705ebf1a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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 "$@"
|