From 2ff698ce1d4f792388e320bfba0b07779eba1b4f Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 2 Feb 2010 14:55:36 +0000 Subject: Andrei, 27644, ish: check for #! without a fork --- Config/installfns.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Config') diff --git a/Config/installfns.sh b/Config/installfns.sh index 677a8fbfe..cf587c438 100755 --- a/Config/installfns.sh +++ b/Config/installfns.sh @@ -46,8 +46,11 @@ for file in $allfuncs; do fi test -d $instdir || /bin/sh $sdir_top/mkinstalldirs $instdir || exit 1 $INSTALL_DATA $sdir_top/$file $instdir || exit 1 - if sed -ne '1p' $sdir_top/$file | grep '^#!' >/dev/null; then - chmod +x $instdir/`echo $file | sed -e 's%^.*/%%'` - fi + read line < $sdir_top/$file + case "$line" in + '#!'*) + chmod +x $instdir/`echo $file | sed -e 's%^.*/%%'` + ;; + esac fi done -- cgit 1.4.1