mirror of
https://github.com/rworkman/slackpkg
synced 2024-12-26 21:58:27 +01:00
Allow using vimdiff to compare .new and original files
Signed-off-by: Robby Workman <rworkman@slackware.com>
This commit is contained in:
parent
406e0e84f5
commit
98c8ffda23
1 changed files with 16 additions and 1 deletions
|
@ -111,6 +111,18 @@ removeold() {
|
||||||
rm $i
|
rm $i
|
||||||
}
|
}
|
||||||
|
|
||||||
|
runvimdiff() {
|
||||||
|
BASENAME=$(basename $i .new)
|
||||||
|
FILEPATH=$(dirname $i)
|
||||||
|
FULLNAME="${FILEPATH}/${BASENAME}"
|
||||||
|
|
||||||
|
if [ -e ${FULLNAME} ]; then
|
||||||
|
vimdiff ${FULLNAME} ${FULLNAME}.new
|
||||||
|
else
|
||||||
|
echo "file $FULLNAME doesn't exist"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
looknew() {
|
looknew() {
|
||||||
|
|
||||||
# with ONLY_NEW_DOTNEW set, slackpkg will search only for
|
# with ONLY_NEW_DOTNEW set, slackpkg will search only for
|
||||||
|
@ -166,7 +178,7 @@ What do you want (K/O/R/P)?"
|
||||||
GOEX=0
|
GOEX=0
|
||||||
while [ $GOEX -eq 0 ]; do
|
while [ $GOEX -eq 0 ]; do
|
||||||
echo
|
echo
|
||||||
showmenu $i "(K)eep" "(O)verwrite" "(R)emove" "(D)iff" "(M)erge"
|
showmenu $i "(K)eep" "(O)verwrite" "(R)emove" "(D)iff" "(M)erge" "(V)imdiff [dp put, do obtain, ^W^W switch]" showmenu $i "(K)eep" "(O)verwrite" "(R)emove" "(D)iff" "(M)erge"
|
||||||
read ANSWER
|
read ANSWER
|
||||||
case $ANSWER in
|
case $ANSWER in
|
||||||
O|o)
|
O|o)
|
||||||
|
@ -183,6 +195,9 @@ What do you want (K/O/R/P)?"
|
||||||
M|m)
|
M|m)
|
||||||
mergenew $1
|
mergenew $1
|
||||||
;;
|
;;
|
||||||
|
V|v)
|
||||||
|
runvimdiff $1
|
||||||
|
;;
|
||||||
K|k|*)
|
K|k|*)
|
||||||
GOEX=1
|
GOEX=1
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue