pacdiff : add diffsearchpath option
Xav: added doc Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
c6095e1032
commit
6ed7d001f6
1 changed files with 6 additions and 2 deletions
|
@ -18,19 +18,23 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
diffprog=${DIFFPROG:-vimdiff}
|
diffprog=${DIFFPROG:-vimdiff}
|
||||||
|
diffsearchpath=${DIFFSEARCHPATH:-/etc}
|
||||||
locate=0
|
locate=0
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "pacdiff : a simple pacnew/pacorig/pacsave updater"
|
echo "pacdiff : a simple pacnew/pacorig/pacsave updater"
|
||||||
echo "Usage : pacdiff [-l]"
|
echo "Usage : pacdiff [-l]"
|
||||||
echo "The -l/--locate flag makes pacdiff use locate rather than find"
|
echo " -l/--locate makes pacdiff 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\" pacdiff"
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd() {
|
cmd() {
|
||||||
if [ $locate -eq 1 ]; then
|
if [ $locate -eq 1 ]; then
|
||||||
locate -0 -e -b \*.pacnew \*.pacorig \*.pacsave
|
locate -0 -e -b \*.pacnew \*.pacorig \*.pacsave
|
||||||
else
|
else
|
||||||
find /etc/ \( -name \*.pacnew -o -name \*.pacorig -o -name \*.pacsave \) -print0
|
find $diffsearchpath \( -name \*.pacnew -o -name \*.pacorig -o -name \*.pacsave \) -print0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue