From: Pádraig Brady
Date: Wed, 25 Nov 2015 14:26:59 +0000 (+0000) Subject: tests: for compare_(), use cmp -s where available X-Git-Tag: v8.25~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0d963da29d984b746bc94db47be70afd61131a2;p=thirdparty%2Fcoreutils.git tests: for compare_(), use cmp -s where available * tests/init.sh (compare_): Only fall back to cmp without the POSIX defined -s option, where this is not available. --- diff --git a/tests/init.sh b/tests/init.sh index d36620610e..ed640f32c4 100755 --- a/tests/init.sh +++ b/tests/init.sh @@ -327,7 +327,7 @@ elif diff_out_=`exec 2>/dev/null; diff -c "$0" "$0" < /dev/null`; then fi } fi -elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then +elif cmp -s /dev/null /dev/null 2>/dev/null; then compare_ () { cmp -s "$@"; } else compare_ () { cmp "$@"; }