Making teeworlds executables accept parameters (to configure a teeworlds server for example)

svn path=/nixpkgs/trunk/; revision=19768
This commit is contained in:
Lluís Batlle i Rossell 2010-02-02 18:09:58 +00:00
parent a066167a9e
commit 90962dc4cb

View File

@ -55,7 +55,7 @@ stdenv.mkDerivation rec {
mv -v "$out/bin/$program" "$out/bin/.wrapped-$program"
cat > "$out/bin/$program" <<EOF
#!/bin/sh
cd "$out/share/${name}" && exec "$out/bin/.wrapped-$program"
cd "$out/share/${name}" && exec "$out/bin/.wrapped-$program" "\$@"
EOF
chmod -v +x "$out/bin/$program"
done