Use pacman local db to find pacnews based on active configs. Relegate
find to an option. Rename DIFFSEARCHPATH to DIFFFINDPATH to clarify use.
Add quit option to prompts. Clarify help.
---
contrib/pacdiff.sh.in | 65 +++++++++++++++++++++++++++++++++++++--------------
1 file changed, 47 insertions(+), 18 deletions(-)
diff --git a/contrib/pacdiff.sh.in b/contrib/pacdiff.sh.in
index 47779d6..25c3fd6 100644
--- a/contrib/pacdiff.sh.in
+++ b/contrib/pacdiff.sh.in
@@ -22,8 +22,8 @@ declare -r myname='pacdiff'
declare -r myver='@PACKAGE_VERSION@'
diffprog=${DIFFPROG:-vimdiff}
-diffsearchpath=${DIFFSEARCHPATH:-/etc}
-locate=0
+difffindpath=${DIFFFINDPATH:-/etc}
+diffpacmandb=${DIFFPACMANDB:-/var/lib/pacman}
USE_COLOR='y'
m4_include(../scripts/library/output_format.sh)
@@ -32,11 +32,21 @@ m4_include(../scripts/library/term_colors.sh)
usage() {
echo "$myname : a simple pacnew/pacorig/pacsave updater"
- echo "Usage : $myname [-l]"
- echo " -l/--locate makes $myname use locate rather than find"
- echo " DIFFPROG variable allows to override the default vimdiff"
- echo " DIFFSEARCHPATH allows to override the default /etc path"
- echo "Example : DIFFPROG=meld DIFFSEARCHPATH=\"/boot /etc /usr\" $myname"
+ echo ""
+ echo "Usage : $myname [-lf]"
+ echo " -l/--locate makes $myname search using locate"
+ echo " -f/--find makes $myname search using find"
+ echo ""
+ echo "Note: the default search looks for backup files in the local pacman db"
+ echo " this generally will not find *.pacsave files"
+ echo ""
+ echo " DIFFPROG variable will override the default editor: vimdiff"
+ echo " DIFFFINDPATH will override the default path when using --find"
+ echo " DIFFPACMANDB will override the default pacman db for the "
+ echo " default search type"
+ echo ""
+ echo "Example : DDIFFPROG=meld DIFFPACMANDB=/mnt/var/lib/pacman/ $myname"
+ echo "Example : DIFFFINDPATH=\"/boot /etc /usr\" $myname"
}
version() {
@@ -45,18 +55,12 @@ version() {
echo 'Copyright (C) 2013 Pacman Development Team