Allow guilt-push to run from a subdir
[guilt.git] / guilt-delete
blob4b67c88130b05a7c66ac87232551fdd25eebc975
1 #!/bin/bash
3 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
6 source "`dirname $0`/guilt"
8 patch="$1"
10 if [ -z "$patch" ]; then
11 echo "You must specify a patch to delete"
12 exit 1
15 p=`grep -e "^$patch\$" < "$applied"`
16 if [ ! -z "$p" ] ; then
17 echo "Cannot delete an applied patch"
18 exit 1
21 ex -s -c ":%g/^$patch\$/d|:wq" "$series"