]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: for compare_(), use cmp -s where available
authorPádraig Brady <P@draigBrady.com>
Wed, 25 Nov 2015 14:26:59 +0000 (14:26 +0000)
committerPádraig Brady <P@draigBrady.com>
Wed, 25 Nov 2015 15:12:37 +0000 (15:12 +0000)
* tests/init.sh (compare_): Only fall back to cmp without
the POSIX defined -s option, where this is not available.

tests/init.sh

index d36620610e3cd4e772ec87ac26b21e388c815802..ed640f32c4f9f67f50cfbaaf30a79606b3184e1d 100755 (executable)
@@ -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 "$@"; }