summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-12-19 23:22:22 +0100
committerAllan McRae <allan@archlinux.org>2013-01-03 12:03:10 +1000
commit163ba4016efb0628a16c4dd882fb6a2030b3efef (patch)
treee6f7375c626286942d6da20299637b4e14844058 /contrib
parent495460d71737ade257d8a6a3c06d21f36c08e7dd (diff)
downloadpacman-163ba4016efb0628a16c4dd882fb6a2030b3efef.tar.xz
pacdiff: Add option to overwrite, clarify remove option
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.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/pacdiff.sh.in b/contrib/pacdiff.sh.in
index 095f7b6e..28569753 100644
--- a/contrib/pacdiff.sh.in
+++ b/contrib/pacdiff.sh.in
@@ -97,15 +97,16 @@ while IFS= read -u 3 -r -d '' pacfile; do
echo " Files are identical, removing..."
rm -v "$pacfile"
else
- echo -n " File differences found. (V)iew, (S)kip, (R)emove: [v/s/r] "
+ printf " (V)iew, (S)kip, (R)emove %s, (O)verwrite with %s: [v/s/r/o] " "$file_type" "$file_type"
while read c; do
case $c in
r|R) rm -v "$pacfile"; break ;;
+ o|O) mv -v "$pacfile" "$file"; break ;;
v|V)
$diffprog "$pacfile" "$file"
rm -iv "$pacfile"; break ;;
s|S) break ;;
- *) echo -n " Invalid answer. Try again: [v/s/r] "; continue ;;
+ *) printf " Invalid answer. Try again: [v/s/r/o] "; continue ;;
esac
done
fi