From 495460d71737ade257d8a6a3c06d21f36c08e7dd Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 19 Dec 2012 23:21:56 +0100 Subject: pacdiff: check cmp's exit code rather than output Signed-off-by: Florian Pritz Signed-off-by: Allan McRae --- contrib/pacdiff.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib') 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 -- cgit v1.2.3-70-g09d2