3 . patchfns >/dev/null || . /usr/lib/patch-scripts/patchfns >/dev/null || { \
4 echo "Impossible to find my library 'patchfns'."
5 echo "Check your install, or go to the right directory"
11 echo "Usage: mpatch patchname [output_dir]"
26 # doit touch -t 7001011000.00 $1
27 doit touch -t 7001010000.00 $1
45 PATCH_NAME=$(stripit $1)
48 FILES=$(cat $P/pc/$PATCH_NAME.pc)
49 OUT=$P/patches/$PATCH_NAME.patch
50 TMPOUT=$(mktemp /tmp/patch-$PATCH_NAME-XXXXXX)
51 TXT=$P/txt/$PATCH_NAME.txt
52 OLDDIR=$(basename $(/bin/pwd))
53 NEWDIR=$OLDDIR-$LOGNAME
55 if is_applied_last $PATCH_NAME
59 echo $PATCH_NAME is not the last-applied patch
64 echo "Placing patch in " $OUT
66 if [ -e $TXT -a -s $TXT ]
73 echo "**** No patch description for $PATCH_NAME ****"
80 OLD_FILE="$file"~"$PATCH_NAME"
93 echo diff -puN $XDIFF_OPTS $DIFF_OPTS $OLD_FILE $NEW_FILE
94 diff -puN $XDIFF_OPTS $DIFF_OPTS $OLD_FILE $NEW_FILE | p0-2-p1 $OLDDIR $NEWDIR >> $TMPOUT
96 diffstat -p1 $TMPOUT >> $OUT 2>/dev/null