Fixed guilt-{delete,pop} regexps some more
[guilt.git] / guilt-delete
blob46c54edd15d0d9948c53d814171b8249a9bebc9b
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 "^[0-9a-f]\{40\}:$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"