firefox: Use exec in wrappers

This commit is contained in:
Eelco Dolstra 2012-11-26 13:57:00 +01:00
parent b481d4daf1
commit 9b97ceb397

View File

@ -94,7 +94,7 @@ rec {
for i in $out/lib/$libDir/*; do
file $i;
if file $i | grep executable &>/dev/null; then
echo -e '#! /bin/sh\n"'"$i"'" "$@"' > "$out/bin/$(basename "$i")";
echo -e '#! /bin/sh\nexec "'"$i"'" "$@"' > "$out/bin/$(basename "$i")";
chmod a+x "$out/bin/$(basename "$i")";
fi;
done
@ -156,18 +156,9 @@ rec {
postInstall =
''
ln -s ${xulrunner}/lib/xulrunner-${xulrunner.version} $(echo $out/lib/firefox-*)/xulrunner
for j in $out/bin/*; do
i="$(readlink "$j")";
file $i;
if file $i | grep executable &>/dev/null; then
rm "$out/bin/$(basename "$i")"
echo -e '#! /bin/sh\nexec "'"$i"'" "$@"' > "$out/bin/$(basename "$i")"
chmod a+x "$out/bin/$(basename "$i")"
fi;
done;
cd "$out/lib/"firefox-*
rm firefox
echo -e '#!${stdenv.shell}\n${xulrunner}/bin/xulrunner "'"$PWD"'/application.ini" "$@"' > firefox
echo -e '#!${stdenv.shell}\nexec ${xulrunner}/bin/xulrunner "'"$PWD"'/application.ini" "$@"' > firefox
chmod a+x firefox
''; # */