From d82d674475098a8daf14e70e50d802d00ba33835 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Fri, 23 Apr 2004 00:10:27 +0000 Subject: [PATCH] Changed the directory structure a little and added a quit command. --- verify-patches | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/verify-patches b/verify-patches index 1764457..2c48234 100755 --- a/verify-patches +++ b/verify-patches @@ -9,38 +9,40 @@ if [ ! -f verify-patches ]; then fi root=`cat ../CVS/Root` -cvsdir=,cvsdir-for-patch-tests -tmpdir=,tmpdir-for-patch-tests +tmpdir=,tmp-for-patch-tests [ -d $tmpdir ] || mkdir $tmpdir -cvs -d "$root" co -d $cvsdir rsync - cd $tmpdir || exit 1 +[ -d ,workdir ] || mkdir ,workdir +echo "Using CVS to update the $tmpdir/,cvsdir copy of the source." +cvs -d "$root" co -d ,cvsdir rsync + +cd ,workdir || exit 1 + if [ -z "$1" ]; then - set -- ../*.diff + set -- ../../*.diff fi for xx in "${@}"; do case "$xx" in *gzip-rsyncable.diff) continue ;; - patches/*) xx=`echo $xx | sed 's:patches:..:'` ;; + patches/*) xx=`echo $xx | sed 's:patches:../..:'` ;; */*.diff) ;; - *.diff) xx=../$xx ;; + *.diff) xx=../../$xx ;; *) continue ;; esac - rsync -a --delete ../$cvsdir/ . + rsync -a --delete ../,cvsdir/ . echo -e "\n----------- $xx ------------" patch -p0 <$xx | tee ,patch.output new='' for nn in `sed -n 's/^patching file //p' ,patch.output`; do - [ -f ../$cvsdir/$nn ] || new="$new $nn" + [ -f ../,cvsdir/$nn ] || new="$new $nn" done while : ; do - echo -ne "\nFix rejections, Make proto.h, Edit diffs, Update, Next: [n] " + echo -ne "\nFix rejections, Make proto.h, Edit diffs, Update, Next, Quit: [n] " read ans case "$ans" in - '') break ;; [Ee]*) [ ! -z "$new" ] && cvs add $new new='' @@ -67,6 +69,12 @@ for xx in "${@}"; do echo -e "\n*** Edit the diffs first. ***" fi ;; + [Nn]*|'') + break + ;; + [Qq]*) + exit 0 + ;; esac done done -- 2.34.1