diff options
Diffstat (limited to 'games/annelid/files/annelid-sh.in')
-rw-r--r-- | games/annelid/files/annelid-sh.in | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/games/annelid/files/annelid-sh.in b/games/annelid/files/annelid-sh.in new file mode 100644 index 000000000000..6199a320986d --- /dev/null +++ b/games/annelid/files/annelid-sh.in @@ -0,0 +1,19 @@ +#!/bin/sh + +# The executable needs to be run from its data directory, and needs to store +# configuration in it. We therefore mirror the data directory hierarchy in +# ~/.annelid, and create symlinks to the data files. + +cd %%DATADIR%% || exit 1 + +mkdir -p ~/.annelid || exit 1 + +test -f ~/.annelid/annelid.dat || cp annelid.dat ~/.annelid && \ +chmod u+w ~/.annelid/annelid.dat + +find * -type f -exec ln -s %%DATADIR%%/{} ~/.annelid/{} \; 2>/dev/null || \ +exit 1 + +cd ~/.annelid || exit 1 + +exec %%PREFIX%%/libexec/annelid "$@" |