Fix nethack/zangband wrappers
svn path=/nixpkgs/trunk/; revision=15575
This commit is contained in:
parent
f616199fb5
commit
fed0f330e7
@ -40,9 +40,10 @@ rec {
|
||||
ln -s $out/games/nethack $out/bin/nethack
|
||||
sed -i $out/bin/nethack -e '5aNEWHACKDIR="$HOME/.nethack"'
|
||||
sed -i $out/bin/nethack -e '6amkdir -p "$NEWHACKDIR/save"'
|
||||
sed -i $out/bin/nethack -e '7aln -s "$HACKDIR"/* "$NEWHACKDIR" &>/dev/null'
|
||||
sed -i $out/bin/nethack -e '8atest -L "$NEWHACKDIR/record" && rm "$NEWHACKDIR"/record'
|
||||
sed -i $out/bin/nethack -e '9aexport HACKDIR="$NEWHACKDIR"'
|
||||
sed -i $out/bin/nethack -e '7afor i in $(find "$NEWHACKDIR" -type l); do if ! test -e $(readlink "$i"); then rm "$i"; fi; done;'
|
||||
sed -i $out/bin/nethack -e '8aln -s "$HACKDIR"/* "$NEWHACKDIR" &>/dev/null'
|
||||
sed -i $out/bin/nethack -e '9atest -L "$NEWHACKDIR/record" && rm "$NEWHACKDIR"/record'
|
||||
sed -i $out/bin/nethack -e '10aexport HACKDIR="$NEWHACKDIR"'
|
||||
'') ["minInit" "defEnsureDir"];
|
||||
|
||||
makeFlags = [
|
||||
|
@ -44,6 +44,7 @@ rec {
|
||||
for i in lib/*/*.raw; do
|
||||
test -L "$i" && rm "$i";
|
||||
done
|
||||
for i in $(find lib -type l); do if ! test -e $(readlink "$i"); then rm "$i"; fi; done;
|
||||
export ANGBAND_PATH="$PWD"
|
||||
"'$out'/bin/.zangband.real" "$@"
|
||||
' > $out/bin/zangband
|
||||
|
Loading…
Reference in New Issue
Block a user