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

make-dist

index b6dea4feb4ed650fcacf3f75a033d756933086bf..abce8f49d4ecd048054840ee5946913ba3951175 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; }
@@ -266,7 +266,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}'"