@@ -54,7 +54,6 @@ set -e -o posix
mgexecflags=()
adjustsets=()
-adjusts=()
allocs=()
logfile=tmp/mg-repro-setup.log
duration=28d
@@ -104,14 +103,17 @@ adjrunvar () {
delrunvar "$1"
adjusts+=(runvar-set "$job" "$1" "$2")
}
-
-for arg in "${adjustsets[@]}"; do
- case "$arg" in
- !*|^*) delrunvar "${arg#?}" ;;
- *=*) adjrunvar "${arg%%=*}" "${arg#*=}" ;;
- *) bad-adjuistset-pattern ;;
- esac
-done
+compute_adjusts () {
+ adjusts=()
+ for arg in "$@"; do
+ case "$arg" in
+ !*|^*) delrunvar "${arg#?}" ;;
+ *=*) adjrunvar "${arg%%=*}" "${arg#*=}" ;;
+ *) bad-adjuistset-pattern ;;
+ esac
+ done
+}
+compute_adjusts "${adjustsets[@]}"
while [ $# -ne 0 ]; do
arg=$1; shift
No functional change. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> --- mg-repro-setup | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)