summarylogtreecommitdiffstats
path: root/dfhack-run.sh
blob: a4e3e1f730b3c7a4fd89944829908aa1e744f9e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

# check for dwarffortress user directory
if [[ ! -d ~/.dwarffortress ]] ; then
	echo "Error: dfhack-run passes commands to a running instance of\
 DFHack, but ~/.dwarffortress/ does not exist and should have been\
 created when dfhack was run" >&2
 	exit 1
fi

# check for dfhack user directory
if [[ ! -d ~/.dwarffortress/hack ]] ; then
	echo "Error: dfhack-run passes commands to a running instance of\
 DFHack, but ~/.dwarffortress/hack/ does not exist and should have been\
 created when dfhack was run" >&2
 	exit 1
fi

# workaround for bug in Debian/Ubuntu SDL patch
export SDL_DISABLE_LOCK_KEYS=1

cd ~/.dwarffortress
exec ./dfhack-run "$@"