diff options
author | Jim Meyering <meyering@redhat.com> | 2008-12-29 20:43:48 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-01-01 02:15:07 +0100 |
commit | cf5616a0aaa6f357b5d74e495dddcc0d8dac100c (patch) | |
tree | b9f78c8fe52f17be1aa251e5b8e9b80c984dbf71 | |
parent | 13601dd3cf69488137b3e90ee0bd33fa3136ad8a (diff) | |
download | coreutils-cf5616a0aaa6f357b5d74e495dddcc0d8dac100c.tar.xz |
bootstrap: don't use cmp's -s option when reading from a pipe
GNU cmp exits without reading all input when given the -s option,
and that can cause termination of the writing process via SIGPIPE.
Instead, when reading from a pipe, just redirect output to /dev/null
so that all input is read.
-rwxr-xr-x | bootstrap | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -198,7 +198,7 @@ insert_sorted_if_absent() { file=$1 str=$2 test -f $file || touch $file - echo "$str" | sort -u - $file | cmp -s - $file \ + echo "$str" | sort -u - $file | cmp - $file > /dev/null \ || echo "$str" | sort -u - $file -o $file \ || exit 1 } @@ -585,7 +585,7 @@ slurp() { if test $file = Makefile.am; then copied=$copied${sep}$gnulib_mk; sep=$nl remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g" - sed "$remove_intl" $1/$dir/$file | cmp -s - $dir/$gnulib_mk || { + sed "$remove_intl" $1/$dir/$file | cmp - $dir/$gnulib_mk > /dev/null || { echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." && rm -f $dir/$gnulib_mk && sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk |