3 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
6 source "`dirname $0`/guilt.lib"
10 if [ -z "$patch" ]; then
11 echo "You must specify a patch name"
14 iidx
=`wc -l < $applied`
17 # make sure that there are no unapplied changes
18 if ! must_commit_first
; then
19 echo "Uncommited changes detected. Refresh first."
23 # create the empty patch file
24 touch $GUILT_DIR/$branch/$patch
28 if [ ! -z "$top" ]; then
29 sed -i -e "s,^$top\$,$top\n$patch," $series
31 echo "$patch" > $series.tmp
32 cat $series >> $series.tmp
33 mv $series.tmp
$series
38 echo $patch >> $applied