diff options
author | Pádraig Brady <P@draigBrady.com> | 2015-11-25 14:26:59 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2015-11-25 15:12:37 +0000 |
commit | f0d963da29d984b746bc94db47be70afd61131a2 (patch) | |
tree | a91f6fbdd5e18a2c91c490b3f5095311244b6b14 /tests/init.sh | |
parent | 34f20fcc4a0abeef93bcc5995f2e083f1cf93c0f (diff) | |
download | coreutils-f0d963da29d984b746bc94db47be70afd61131a2.tar.xz |
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.
Diffstat (limited to 'tests/init.sh')
-rwxr-xr-x | tests/init.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/init.sh b/tests/init.sh index d36620610..ed640f32c 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 "$@"; } |