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"
47 echo -e "\nFix rejects, Make proto, Edit both diffs, Update patch,"
48 echo -n "Apply patch again, Next, Quit: [n] "
52 [ ! -z "$new" ] && cvs add $new
55 sed '/^--- /,$ d' $xx >,new.patch
56 cvs diff -N | grep -v '^Index: ' |
57 grep -v '^=========' |
59 grep -v '^RCS file: ' |
60 grep -v '^retrieving revision ' >>,new.patch
67 cat *.c lib/compat.c | awk -f mkproto.awk >proto.h
68 echo -e "\nRegenerated proto.h"
71 if [ -f ,new.patch ]; then
73 echo -e "\nCopied ,new.patch to $xx"
75 echo -e "\n*** Edit the diffs first. ***"