about summary refs log tree commit diff
path: root/Config
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-02-02 14:55:36 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-02-02 14:55:36 +0000
commit2ff698ce1d4f792388e320bfba0b07779eba1b4f (patch)
tree98812a3f9555675c14997b22dde9fe99806ebedb /Config
parent84fb892f0ac76905b7af4d9aa235322442fd3930 (diff)
downloadzsh-2ff698ce1d4f792388e320bfba0b07779eba1b4f.tar.gz
zsh-2ff698ce1d4f792388e320bfba0b07779eba1b4f.tar.xz
zsh-2ff698ce1d4f792388e320bfba0b07779eba1b4f.zip
Andrei, 27644, ish: check for #! without a fork
Diffstat (limited to 'Config')
-rwxr-xr-xConfig/installfns.sh9
1 files changed, 6 insertions, 3 deletions
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