hack/update-codegen.sh: split string into array robustly.

Use "mapfile" and "read" to split the $KUBE_AVAILABLE_GROUP_VERSIONS
string into an array using space as the delimiter. This prevents shell
from globbing and splitting the string in potentially wrong places.
This commit is contained in:
Ismo Puustinen 2018-02-13 13:02:06 +02:00
parent 7da195cac2
commit b6fbe2aee5

View File

@ -38,7 +38,7 @@ informergen=$(kube::util::find-binary "informer-gen")
# that generates the set-gen program.
#
GROUP_VERSIONS=(${KUBE_AVAILABLE_GROUP_VERSIONS})
IFS=" " read -ra GROUP_VERSIONS <<< "$KUBE_AVAILABLE_GROUP_VERSIONS"
GV_DIRS=()
INTERNAL_DIRS=()
for gv in "${GROUP_VERSIONS[@]}"; do