3 [ -d patches ] && cd patches
5 if [ ! -f verify-patches ]; then
6 echo "Please run this script from the root of the rsync dir"
7 echo "or from inside the patches subdir."
11 root=`cat ../CVS/Root`
12 tmpdir=,tmp-for-patch-tests
14 [ -d $tmpdir ] || mkdir $tmpdir
17 [ -d ,workdir ] || mkdir ,workdir
18 echo "Using CVS to update the $tmpdir/,cvsdir copy of the source."
19 cvs -d "$root" co -d ,cvsdir rsync
29 *gzip-rsyncable.diff) continue ;;
30 patches/*) xx=`echo $xx | sed 's:patches:../..:'` ;;
32 *.diff) xx=../../$xx ;;
37 echo -e "\n----------- $xx ------------"
38 if [ $apply = y ]; then
39 rsync -a --delete ../,cvsdir/ .
40 patch -p0 <$xx | tee ,patch.output
42 for nn in `sed -n 's/^patching file //p' ,patch.output`; do
43 [ -f ../,cvsdir/$nn ] || new="$new $nn"
45 if grep "^Hunk #[0-9]* FAILED" ,patch.output >/dev/null; then
47 elif grep "^Hunk #[0-9]* succeeded at [0-9]* (offset" ,patch.output >/dev/null; then
54 echo -e "\nFix rejects, Make proto, Edit both diffs, Update patch,"
55 echo -n "Apply patch again, Next, Quit: [$default] "
57 [ -z "$ans" ] && ans=$default
60 [ ! -z "$new" ] && cvs add $new
63 sed '/^--- /,$ d' $xx >,new.patch
64 cvs diff -N | grep -v '^Index: ' |
65 grep -v '^=========' |
67 grep -v '^RCS file: ' |
68 grep -v '^retrieving revision ' >>,new.patch
77 cat *.c lib/compat.c | awk -f mkproto.awk >proto.h
78 echo -e "\nRegenerated proto.h"
82 if [ -f ,new.patch ]; then
84 echo -e "\nCopied ,new.patch to $xx"
87 echo -e "\n*** Edit the diffs first. ***"