Don't use `head -1'; it's no longer portable.
authorJim Meyering <jim@meyering.net>
Mon, 18 Feb 2002 15:52:46 +0000 (15:52 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 18 Feb 2002 15:52:46 +0000 (15:52 +0000)
Use `sed 1q' instead.

m4/depout.m4
tests/insthook.test

index bb45738..4ab715a 100644 (file)
@@ -1,6 +1,6 @@
 # Generate code to set up dependency tracking.   -*- Autoconf -*-
 
-# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 [for mf in $CONFIG_FILES; do
   # Strip MF so we end up with the name of the file.
   mf=`echo "$mf" | sed -e 's/:.*$//'`
-  if (head -1 $mf | fgrep 'generated by automake') > /dev/null 2>&1; then
+  if (sed 1q $mf | fgrep 'generated by automake') > /dev/null 2>&1; then
     dirpart=`AS_DIRNAME("$mf")`
   else
     dirpart=
index 7950bb2..c12376b 100755 (executable)
@@ -15,4 +15,4 @@ $AUTOMAKE || exit 1
 
 test "`grep install-exec-hook Makefile.in | wc -l`" -gt 1 || exit 1
 lnum=`grep -n '^install-exec-am:' Makefile.in | awk -F: '{print $1}'`
-test x$lnum != x && tail +$lnum Makefile.in | head -3 | grep install-exec-hook
+test x$lnum != x && tail +$lnum Makefile.in | sed 3q | grep install-exec-hook