>From c3f41ec0acbb9487002c14d310b1c63d3346a10b Mon Sep 17 00:00:00 2001 From: Mike Miller Date: Mon, 12 Aug 2013 22:39:49 -0400 Subject: [PATCH] bootstrap: port to OpenBSD sed * build-aux/bootstrap (insert_if_absent): Port to OpenBSD sed which does not interpret `-' as a file argument to mean stdin. --- ChangeLog | 6 ++++++ build-aux/bootstrap | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3c8eb4d..57b078d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-08-12 Mike Miller + + bootstrap: port to OpenBSD sed + * build-aux/bootstrap (insert_if_absent): Port to OpenBSD sed which + does not interpret `-' as a file argument to mean stdin. + 2013-08-11 Paul Eggert fpending: port to recent Cygwin change to stdio_ext.h diff --git a/build-aux/bootstrap b/build-aux/bootstrap index df763de..d2a4665 100755 --- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh # Print a version string. -scriptversion=2013-08-09.15; # UTC +scriptversion=2013-08-13.02; # UTC # Bootstrap this package from checked-out sources. @@ -320,7 +320,7 @@ insert_if_absent() { die "Error: Duplicate entries in $file: " $duplicate_entries fi linesold=$(gitignore_entries $file | wc -l) - linesnew=$(echo "$str" | gitignore_entries - $file | sort -u | wc -l) + linesnew=$( { echo "$str"; cat $file; } | gitignore_entries | sort -u | wc -l) if [ $linesold != $linesnew ] ; then { echo "$str" | cat - $file > $file.bak && mv $file.bak $file; } \ || die "insert_if_absent $file $str: failed" -- 1.8.3.2