|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH v2 2/5] mg-repro-setup: Allow, and advertise, ^ for unsetting runvars
This avoids any possible problems with shells misinterpreting ! and is
consistent with the other recent changes replacing ! for negation
with ^.
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
mg-repro-setup | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/mg-repro-setup b/mg-repro-setup
index aa93c0ea..37ccb59d 100755
--- a/mg-repro-setup
+++ b/mg-repro-setup
@@ -37,7 +37,7 @@ usage () { cat <<END
--rogue bypass queuing system and allocate now
--capture do not suppress log capture
-r<var>=<value> set runvar
- -r!<var> delete runvar
+ -r^<var> delete runvar
-B<blessing> default is 'play'
-E... -f... -P as for mg-execute-flight
--autoalloc-nofree allocate hosts as for production, but keep them
@@ -77,7 +77,9 @@ while true; do
--capture) skipcapture=false ;;
--autoalloc-nofree) autoalloc=true ;;
-l*) logfile=${arg#-l} ;;
- -r!*) adjustsets+=("${arg#-r}") ;;
+ -r^*|-r!*) adjustsets+=("${arg#-r}") ;;
+ # ^ two patterns because there's no way in bash to write
+ # a glob character class which matches exactly ^ or !
-r*=*) adjustsets+=("${arg#-r}") ;;
--) break ;;
*) badusage ;;
@@ -105,7 +107,7 @@ adjrunvar () {
for arg in "${adjustsets[@]}"; do
case "$arg" in
- !*) delrunvar "${arg#!}" ;;
+ !*|^*) delrunvar "${arg#?}" ;;
*=*) adjrunvar "${arg%%=*}" "{$arg#*=}" ;;
*) bad-adjuistset-pattern ;;
esac
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |