3 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
6 USAGE
="[-e] [<patchname>]"
13 if [ "$1" = "-e" ]; then
20 if [ -z "$patch" ]; then
21 # use the patch that's on the top of the stack
23 eidx
=`wc -l < $applied`
24 if [ $eidx -eq 0 ]; then
25 die
"Status file is empty"
28 # use the specified patch
30 eidx
=`get_series | grep -ne "^$patch\$" | cut -d: -f1`
31 if [ $eidx -eq 0 ]; then
32 die
"Patch $patch is not in the series"
37 for p
in `get_series`; do
39 [ $idx -lt $eidx ] && continue
40 [ $idx -gt $eidx ] && break
42 if [ -z "$edit" ]; then
43 do_get_header
$GUILT_DIR/$branch/$p
45 do_get_full_header
$GUILT_DIR/$branch/$p > /tmp
/guilt.msg.$$
46 do_get_patch
$GUILT_DIR/$branch/$p > /tmp
/guilt.
diff.$$
47 $editor "/tmp/guilt.msg.$$"
48 mv $GUILT_DIR/$branch/$p $GUILT_DIR/$branch/$p~
49 cat /tmp
/guilt.msg.$$
> $GUILT_DIR/$branch/$p
50 cat /tmp
/guilt.
diff.$$
>> $GUILT_DIR/$branch/$p