m4-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: If make check fails


From: Akim Demaille
Subject: Re: If make check fails
Date: 28 Aug 2001 11:20:16 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence)

>>>>> "Gary" == Gary V Vaughan <address@hidden> writes:

Gary> Rich, making a change to GNU diff (and the converse to GNU
Gary> patch) to maintain mode information would make a lot of
Gary> developers very happy :-)

There is something else I'm dreaming of: a means to embed some
commands, or a means to hook commands to patches.  Most typically, I
work my patches at home, bring them on a floppy (sometimes I forget to
remove the dirname when I post the patches :) and then apply them on
CVS.

But I often forget cvs add/rm.  I'd like to be able to write/hook
those commands when writing the patch, and forget about those details
when applying them.

Currently, I run this script

#! /bin/sh

me=`basename $0`

set -e

while test $# != 0
do
  patch=$1
  echo "  $patch  " | sed 's/./=/g'
  echo "  $patch  "
  echo "  $patch  " | sed 's/./=/g'
  case $patch in
    -)
     fixpatch | clcleanup >$me.patch
     set dummy $me.patch ${1+"$@"}
     ;;

    --cd)
     cd $2
     shift;;

    --ace)
     cd $ace;;

    --check)
     make check;;

    *)
     remove=
     add=
     cl2patch <"$patch" | patch -E -p0 >patch.log
     cat patch.log
     for file in `sed -n 's/^patching file //p' patch.log`
     do
       if test -s $file; then
          add="$add $file"
       else
          remove="$remove $file"
       fi
     done
     test -d applied ||
       mkdir applied ||
       { echo "cannot create applied"; exit 1; }
     if test -n "$add"; then
       cvs add $add || :
     fi
     if test -n "$remove"; then
       cvs remove $remove || :
     fi
     mv "$patch" applied
     make AUTOMAKE=/usr/local/bin/automake
     clcommit -f -1
  esac
  shift
  echo
done




reply via email to

[Prev in Thread] Current Thread [Next in Thread]