summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-12-19 23:21:56 +0100
committerAllan McRae <allan@archlinux.org>2013-01-03 03:03:10 +0100
commit495460d71737ade257d8a6a3c06d21f36c08e7dd (patch)
tree48e9c14596012e3a21539f2edb849ef5ddd2e01c /contrib
parent6a804d55ddf150c8b716747f0c46750de06679b2 (diff)
downloadpacman-495460d71737ade257d8a6a3c06d21f36c08e7dd.tar.gz
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')
-rw-r--r--contrib/pacdiff.sh.in4
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