run 591 Bytes
Newer Older
1 2 3 4
#!/bin/sh
set -e
set -u

5
# test to see whether we are running in 'development mode'
6
if [ "$0" = "./run" ]; then
7 8
	GDP_UNINSTALLED=1
	export GDP_UNINSTALLED
9
	PYTHONPATH="$(pwd)"
10
elif [ -d /usr/share/games/game-data-packager ]; then
11
	PYTHONPATH=/usr/share/games/game-data-packager
12 13
else
	PYTHONPATH=/usr/share/game-data-packager
14
fi
15
export PYTHONPATH
16

17
if [ $# -eq 0 ]; then
18
	exec python3 -m game_data_packager.command_line
19
fi
20

21 22 23 24 25 26
case "$1" in
	'make-template')
		shift
		exec python3 -m game_data_packager.make_template "$@"
		;;
	*)
27
		exec python3 -m game_data_packager.command_line "$@"
28 29
		;;
esac