Merge "Use a more exact grep for fetching cfg options"
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Sat, 23 Jun 2018 14:56:30 +0000 (14:56 +0000)
committerGerrit Code Review <gerrit@linuxfoundation.org>
Sat, 23 Jun 2018 14:56:30 +0000 (14:56 +0000)
shell/jenkins-configure-clouds.sh

index 3f7dd6a..ed03f5c 100644 (file)
@@ -63,7 +63,7 @@ get_cfg() {
         exit 1
     fi
 
-    cfg=$(grep "${setting^^}" "$cfg_file" | tail -1 | awk -F'=' '{print $2}')
+    cfg=$(grep "^${setting^^}=" "$cfg_file" | tail -1 | awk -F'=' '{print $2}')
     cfg=${cfg:-"$default"}
     echo "$cfg"
 }