1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-14 03:10:47 +00:00
freebsd-ports/games/annelid/files/annelid-sh.in
Renato Botelho fb61ae157c Add annelid 1, remake of the ubiquitous "Snake" and "Worm" games.
PR:		ports/84923
Submitted by:	Alejandro Pulver <alejandro@varnet.biz>
2005-10-04 11:07:34 +00:00

20 lines
519 B
Bash

#!/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 "$@"