Commit 3528b32c authored by John A. Leuenhagen's avatar John A. Leuenhagen Committed by Johannes Löthberg
Browse files

pacdiff: automatically delete pacfile after viewing if identical


Signed-off-by: default avatarJohn A. Leuenhagen <john@zlima12.com>
Message-Id: <66d7ee9e-459b-679e-8df9-c7019b9514f2@zlima12.com>
Signed-off-by: default avatarJohannes Löthberg <johannes@kyriasis.com>
parent bc82ef50
......@@ -184,6 +184,11 @@ while IFS= read -u 3 -r -d '' pacfile; do
o|O) mv -v "$pacfile" "$file"; break ;;
v|V)
$diffprog "$pacfile" "$file"
if cmp -s "$pacfile" "$file"; then
msg2 "Files are identical, removing..."
rm -v "$pacfile"
break
fi
ask "(V)iew, (S)kip, (R)emove %s, (O)verwrite with %s, (Q)uit: [v/s/r/o/q] " "$file_type" "$file_type";
continue ;;
s|S) break ;;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment