3 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
6 source "`dirname $0`/guilt"
8 USAGE
="$USAGE <patchname>"
17 if [ -z "$patch" ]; then
19 echo "You must specify a patch name"
23 iidx
=`wc -l < $applied`
25 # make sure that there are no unapplied changes
26 if ! must_commit_first
; then
27 echo "Uncommited changes detected. Refresh first."
31 # create the empty patch file
32 touch $GUILT_DIR/$branch/$patch
36 if [ ! -z "$top" ]; then
37 sed -i -e "s,^$top\$,$top\n$patch," $series
39 echo "$patch" > $series.tmp
40 cat $series >> $series.tmp
41 mv $series.tmp
$series