Merge "[CPS] New Delhi release changes"
[oom.git] / kubernetes / config / prepull_docker.sh
index efd0bd1..bfd679b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 #function to provide help
 #desc: this function provide help menu
@@ -27,8 +27,15 @@ EOF
 #calling syntax: parse_yaml <yaml_file_name>
 
 parse_yaml () {
-   local prefix=$2
-   local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
+   local prefix
+   prefix=$2
+   local s
+   s='[[:space:]]*'
+   local w
+   w='[a-zA-Z0-9_]*'
+   local fs
+   fs=$(echo @|tr @ '\034')
+
    sed -ne "s|^\($s\):|\1|" \
         -e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \
         -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p"  $1 |
@@ -110,7 +117,7 @@ do
                                 #remove attional prefix and postfix
                                 imageNameFinal=`echo "$imageName" | sed -e 's/^"//' -e 's/"$//' `
 
-                               #check if line contain Version as a subtag in lines if yes then call docker pull with version
+                                #check if line contain Version as a subtag in lines if yes then call docker pull with version
                                 if echo $line | grep -q $IMAGE_VERSION_TEXT ; then
                                         echo docker pull "$imageNameWithVersion":"$imageNameFinal"
                                         docker pull $imageNameWithVersion:$imageNameFinal &