X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fjenkins-configure-clouds.sh;h=405ecedfe56bd9acb0f846580c953488d687b096;hb=4e5148bea90808186cdda4154e62e4297d706270;hp=20092adbb7137b8cfe64dde33e55f081429af275;hpb=dd5b5b5782d06c17614671e07e519493c8475ebf;p=releng%2Fglobal-jjb.git diff --git a/shell/jenkins-configure-clouds.sh b/shell/jenkins-configure-clouds.sh index 20092adb..405ecedf 100644 --- a/shell/jenkins-configure-clouds.sh +++ b/shell/jenkins-configure-clouds.sh @@ -53,11 +53,11 @@ testversion() { local current_val="$1" operator="$2" test_value="$3" awk -vv1="$current_val" -vv2="$test_value" 'BEGIN { split(v1, a, /\:/); - if (a[2] == '$test_value') { - exit (a[2] == '$test_value') ? 0 : 1 + if (a[2] == '"$test_value"') { + exit (a[2] == '"$test_value"') ? 0 : 1 } else { - exit (a[2] '$operator' '$test_value') ? 0 : 1 + exit (a[2] '"$operator"' '"$test_value"') ? 0 : 1 } }' } @@ -327,11 +327,14 @@ for silo in $silos; do mkdir -p "$(dirname "$insert_file")" rm -f "$insert_file" - echo "" >> "$insert_file" - echo "//////////////////////////////////////////////////" >> "$insert_file" - echo "// Cloud config for $(basename "$cloud")" >> "$insert_file" - echo "//////////////////////////////////////////////////" >> "$insert_file" - echo "" >> "$insert_file" + { + echo "" + echo "//////////////////////////////////////////////////" + echo "// Cloud config for $(basename "$cloud")" + echo "//////////////////////////////////////////////////" + echo "" + } >> "$insert_file" + echo "templates = []" >> "$insert_file" mapfile -t templates < <(find "$cfg_dir" -maxdepth 1 -not -type d -not -name "cloud.cfg")