]> code.delx.au - gnu-emacs/commitdiff
Port to POSIX 1003.1-2001, which doesn't allow "head -1".
authorPaul Eggert <eggert@twinsun.com>
Tue, 19 Feb 2002 06:49:08 +0000 (06:49 +0000)
committerPaul Eggert <eggert@twinsun.com>
Tue, 19 Feb 2002 06:49:08 +0000 (06:49 +0000)
"sed q" is a portable equivalent to plain "head -1".

make-dist

index f5f2783419ee9bba28fff71f3054b06d4c240c0c..5c993a19cfdd143c17f73b358a25ebff249f319f 100755 (executable)
--- a/make-dist
+++ b/make-dist
@@ -231,7 +231,7 @@ then
 fi
 
 ### Make sure configure is newer than configure.in.
-if [ "x`ls -t configure configure.in | head -1`" != "xconfigure" ]; then
+if [ "x`ls -t configure configure.in | sed q`" != "xconfigure" ]; then
   echo "\`./configure.in' is newer than \`./configure'" >&2
   echo "Running autoconf" >&2
   autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; }
@@ -268,7 +268,9 @@ echo "Making lisp/MANIFEST"
     files="$files $thisdir"
   fi
  done
- head -1 $files | grep '^;' | sed -e 's/;;; //' | sort > MANIFEST)
+ for file in $files
+ do sed -n 's/^;;; //p; q' $file
+ done | sort > MANIFEST)
 
 echo "Creating staging directory: \`${tempparent}'"