Use sed 1q, not `head -n 1'.
authorJim Meyering <jim@meyering.net>
Mon, 18 Feb 2002 15:50:04 +0000 (15:50 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 18 Feb 2002 15:50:04 +0000 (15:50 +0000)
The latter is not portable to some old systems.

tests/cond12.test

index 9d3d7b0..df7996d 100755 (executable)
@@ -9,7 +9,7 @@
 # FIXME: probably ought to let use override this like we do in `defs'.
 amfile=../../automake
 
-head -n 1 $amfile >>automake_tmp
+sed 1q $amfile >>automake_tmp
 cat << 'END' >> automake_tmp
 my $failed = 0;
 sub check_reduce($$) {
@@ -17,7 +17,7 @@ sub check_reduce($$) {
  my @result = sort &Automake::variable_conditions_reduce(@$inref);
  my $correct = 1;
  $correct = 0 if (join(",", @result) ne join(",", @$outref));
+
  if (! $correct) {
    print '"'.join(",", @$inref) . '" => "' .
         join(",", @result) . '" expected "' .