Matt McCutchen's Web Site
/
rsync
/
rsync-patches.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e507a30
)
Set a better default command based on what just happened.
author
Wayne Davison
<wayned@samba.org>
Sat, 24 Apr 2004 07:57:19 +0000
(07:57 +0000)
committer
Wayne Davison
<wayned@samba.org>
Sat, 24 Apr 2004 07:57:19 +0000
(07:57 +0000)
verify-patches
patch
|
blob
|
blame
|
history
diff --git
a/verify-patches
b/verify-patches
index
e620619
..
849034c
100755
(executable)
--- a/
verify-patches
+++ b/
verify-patches
@@
-42,11
+42,19
@@
for xx in "${@}"; do
for nn in `sed -n 's/^patching file //p' ,patch.output`; do
[ -f ../,cvsdir/$nn ] || new="$new $nn"
done
for nn in `sed -n 's/^patching file //p' ,patch.output`; do
[ -f ../,cvsdir/$nn ] || new="$new $nn"
done
+ if grep "^Hunk #[0-9]* FAILED" ,patch.output >/dev/null; then
+ default=F
+ elif grep "^Hunk #[0-9]* succeeded at [0-9]* (offset" ,patch.output >/dev/null; then
+ default=E
+ else
+ default=N
+ fi
apply=n
fi
echo -e "\nFix rejects, Make proto, Edit both diffs, Update patch,"
apply=n
fi
echo -e "\nFix rejects, Make proto, Edit both diffs, Update patch,"
- echo -n "Apply patch again, Next, Quit: [
n
] "
+ echo -n "Apply patch again, Next, Quit: [
$default
] "
read ans
read ans
+ [ -z "$ans" ] && ans=$default
case "$ans" in
[Ee]*)
[ ! -z "$new" ] && cvs add $new
case "$ans" in
[Ee]*)
[ ! -z "$new" ] && cvs add $new
@@
-59,26
+67,31
@@
for xx in "${@}"; do
grep -v '^RCS file: ' |
grep -v '^retrieving revision ' >>,new.patch
vim -d $xx ,new.patch
grep -v '^RCS file: ' |
grep -v '^retrieving revision ' >>,new.patch
vim -d $xx ,new.patch
+ default=U
;;
[Ff]*)
vim *.rej
;;
[Ff]*)
vim *.rej
+ default=E
;;
[Mm]*)
cat *.c lib/compat.c | awk -f mkproto.awk >proto.h
echo -e "\nRegenerated proto.h"
;;
[Mm]*)
cat *.c lib/compat.c | awk -f mkproto.awk >proto.h
echo -e "\nRegenerated proto.h"
+ default=E
;;
[Uu]*)
if [ -f ,new.patch ]; then
cp -p ,new.patch $xx
echo -e "\nCopied ,new.patch to $xx"
;;
[Uu]*)
if [ -f ,new.patch ]; then
cp -p ,new.patch $xx
echo -e "\nCopied ,new.patch to $xx"
+ default=A
else
echo -e "\n*** Edit the diffs first. ***"
else
echo -e "\n*** Edit the diffs first. ***"
+ default=E
fi
;;
[Aa]*)
apply=y
;;
fi
;;
[Aa]*)
apply=y
;;
- [Nn]*
|''
)
+ [Nn]*)
break
;;
[Qq]*)
break
;;
[Qq]*)