[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 05/11] mg-repro-setup: Break out compute_adjusts



No functional change.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 mg-repro-setup | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/mg-repro-setup b/mg-repro-setup
index c8bcad33..10ab65a8 100755
--- a/mg-repro-setup
+++ b/mg-repro-setup
@@ -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
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.