diff options
author | Florian Pritz <bluewind@xinu.at> | 2012-12-19 23:21:56 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2013-01-03 12:03:10 +1000 |
commit | 495460d71737ade257d8a6a3c06d21f36c08e7dd (patch) | |
tree | 48e9c14596012e3a21539f2edb849ef5ddd2e01c /contrib/pacdiff.sh.in | |
parent | 6a804d55ddf150c8b716747f0c46750de06679b2 (diff) | |
download | pacman-495460d71737ade257d8a6a3c06d21f36c08e7dd.tar.xz |
pacdiff: check cmp's exit code rather than output
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'contrib/pacdiff.sh.in')
-rw-r--r-- | contrib/pacdiff.sh.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/pacdiff.sh.in b/contrib/pacdiff.sh.in index f31e17c8..095f7b6e 100644 --- a/contrib/pacdiff.sh.in +++ b/contrib/pacdiff.sh.in @@ -92,8 +92,8 @@ while IFS= read -u 3 -r -d '' pacfile; do rm -iv "$pacfile" continue fi - check="$(cmp "$pacfile" "$file")" - if [ -z "${check}" ]; then + + if cmp -s "$pacfile" "$file"; then echo " Files are identical, removing..." rm -v "$pacfile" else |