1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

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>
This commit is contained in:
Florian Pritz 2012-12-19 23:21:56 +01:00 committed by Allan McRae
parent 6a804d55dd
commit 495460d717

View File

@ -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