[pacman-dev] [PATCH v2 3/5] pacdiff: check cmp's exit code rather than output
Florian Pritz
bluewind at xinu.at
Wed Dec 19 19:06:35 EST 2012
Signed-off-by: Florian Pritz <bluewind at xinu.at>
---
same patch
contrib/pacdiff.sh.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/pacdiff.sh.in b/contrib/pacdiff.sh.in
index 05531c6..86dc20e 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
--
1.8.0.2
More information about the pacman-dev
mailing list