texlive: fixed erroneous forwarder scripts

- Generate a forwarder scripts only for executable files. This change
   removes the broken 'man' script, for example.

 - Run the real binaries with 'exec'.

 - Use $SHELL to interpret the forwarder scripts rather than /bin/sh.

 - Indent consistently with blanks.

 - Removed some debug output from the build expression.

svn path=/nixpkgs/trunk/; revision=27679
This commit is contained in:
Peter Simons 2011-07-08 22:45:23 +00:00
parent f92f3deed8
commit 758e85cfac
2 changed files with 27 additions and 28 deletions

View File

@ -17,9 +17,9 @@ rec {
echo
done | while read; do head -n 99 >/dev/null; echo -n .; done
for i in $currentPath/bin/* :; do #*/
test "$i" = : && continue;
echo -ne "#! /bin/sh\\n$i \"\$@\"" > "$out/bin/$(basename "$i")" && \
for i in "$currentPath/bin/"* :; do
test "$i" != : || continue
echo -ne "#! $SHELL\\nexec $i \"\$@\"" > "$out/bin/$(basename "$i")" && \
chmod a+x "$out/bin/$(basename "$i")"
done
@ -40,7 +40,7 @@ rec {
test "$i" = : && continue;
test -f "$i" && \
test -x "$i" && \
echo -ne "#! /bin/sh\\n$i \"\$@\"" >$out/bin/$(basename $i) && \
echo -ne "#! $SHELL\\nexec $i \"\$@\"" >$out/bin/$(basename $i) && \
chmod a+x $out/bin/$(basename $i)
done

View File

@ -47,7 +47,8 @@ rec {
mv $out/bin $out/libexec
ensureDir $out/bin
for i in "$out/libexec/"*"/"*; do
echo -ne "#! /bin/sh\\n$i \"\$@\"" >$out/bin/$(basename $i)
test \( \! -d "$i" \) -a -x "$i" || continue
echo -ne "#! $SHELL\\nexec $i \"\$@\"" >$out/bin/$(basename $i)
chmod a+x $out/bin/$(basename $i)
done
[ -d $out/texmf-config ] || ln -s $out/texmf $out/texmf-config
@ -85,9 +86,7 @@ rec {
"--enable-ipc" "--with-mktexfmt"
];
phaseNames = ["addInputs" (doDump "0") "doMainBuild"
(doDump "1")
"doMakeInstall" "doPostInstall"];
phaseNames = ["addInputs" "doMainBuild" "doMakeInstall" "doPostInstall"];
name = "texlive-core-2009";
meta = {