diff options
Diffstat (limited to 'kubernetes/config')
-rwxr-xr-x | kubernetes/config/prepull_docker.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/kubernetes/config/prepull_docker.sh b/kubernetes/config/prepull_docker.sh index 596ace6ad5..bfd679bf3e 100755 --- a/kubernetes/config/prepull_docker.sh +++ b/kubernetes/config/prepull_docker.sh @@ -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 | |