3 # Copyright (c) Eric Lesh, 2007
6 USAGE
="[-l | --list | -n | --none | [<patchname>] [(+|-)<guard>...]]"
11 guards
=`get_guards "$1"`
15 if [ "$1" == "-l" ] ||
[ "$1" == "--list" ]; then
16 get_full_series |
while read patch; do
20 elif [ "$1" == "-n" ] ||
[ "$1" == "--none" ]; then
22 if [ -z "$patch" ]; then
25 unset_guards
"$patch" `get_guards "$patch"`
31 if [ ! -s "$applied" ]; then
32 die
"No patches applied."
34 print_guards
`get_top`
37 if [ -z $
(printf %s
"$1" |
grep -e '^[+-]') ]; then
38 if [ -z $
(get_full_series |
grep -e "^$1\$") ]; then
39 die
"Patch $1 does not exist."
45 if [ -z "$patch" ]; then
46 die
"You must specify a patch."
48 unset_guards
"$patch" `get_guards "$patch"`
49 set_guards
"$patch" "$1"
53 if [ -z $
(printf %s
"$1" |
grep -e '^[+-]') ]; then
54 if [ -z $
(get_full_series |
grep -e "^$1\$") ]; then
55 die
"Patch $1 does not exist."
62 if [ -z "$patch" ]; then
63 die
"You must specify a patch."
66 unset_guards
"$patch" `get_guards "$patch"`
67 set_guards
"$patch" "$@"