Allow 'guilt foo' commands
[guilt.git] / guilt-delete
blobf1b57e5c70c38324d0845e03f7eb1f47f2f041aa
1 #!/bin/bash
3 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
6 source "`dirname $0`/guilt.lib"
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"