3 # Copyright (c) Eric Lesh, 2007
6 USAGE
="[-l | --list | -n | --none | [<patchname>] [(+|-)<guard>...]]"
7 if [ -z "$GUILT_VERSION" ]; then
8 echo "Invoking $GUILT directly is no longer supported." >&2
14 guards
=`get_guards "$1"`
20 if [ "$1" = "-l" -o "$1" = "--list" ]; then
21 get_full_series |
while read patch; do
25 elif [ "$1" = "-n" -o "$1" = "--none" ]; then
27 if [ -z "$patch" ]; then
30 unset_guards
"$patch" `get_guards "$patch"`
36 if [ ! -s "$applied" ]; then
37 die
"No patches applied."
39 print_guards
`get_top`
42 if [ -z $
(printf %s
"$1" |
grep -e '^[+-]') ]; then
43 if [ -z $
(get_full_series |
grep -e "^$1\$") ]; then
44 die
"Patch $1 does not exist."
50 if [ -z "$patch" ]; then
51 die
"You must specify a patch."
53 unset_guards
"$patch" `get_guards "$patch"`
54 set_guards
"$patch" "$1"
58 if [ -z $
(printf %s
"$1" |
grep -e '^[+-]') ]; then
59 if [ -z $
(get_full_series |
grep -e "^$1\$") ]; then
60 die
"Patch $1 does not exist."
67 if [ -z "$patch" ]; then
68 die
"You must specify a patch."
71 unset_guards
"$patch" `get_guards "$patch"`
72 set_guards
"$patch" "$@"