@@ -7,15 +7,15 @@ function usage() {
77 Update the node docker images.
88
99 Usage:
10- $0 [-s] [MAJOR_VERSION] [VARIANT]
10+ $0 [-s] [MAJOR_VERSION(S) ] [VARIANT(S) ]
1111
1212 Examples:
13- - update.sh # Update all images
14- - update.sh -s # Update all images, skip updating Alpine and Yarn
15- - update.sh 8 # Update version 8 and variants (default, slim, alpine etc.)
16- - update.sh -s 8 # Update version 8 and variants, skip updating Alpine and Yarn
17- - update.sh 8 slim # Update all variants for version 8
18- - update.sh -s 8 slim # Update all variants for version 8, skip updating Alpine and Yarn
13+ - update.sh # Update all images
14+ - update.sh -s # Update all images, skip updating Alpine and Yarn
15+ - update.sh 8,9 # Update version 8 and 9 and variants (default, slim, alpine etc.)
16+ - update.sh -s 8 # Update version 8 and variants, skip updating Alpine and Yarn
17+ - update.sh 8 slim,stretch # Update only slim and stretch variants for version 8
18+ - update.sh -s 8 slim,stretch # Update only slim and stretch variants for version 8, skip updating Alpine and Yarn
1919
2020 OPTIONS:
2121 -s Security update; skip updating the yarn and alpine versions.
4646
4747cd " $( cd " ${0%/* } " && pwd -P) "
4848
49+ IFS=' ,' read -ra versions_arg <<< " ${1:-}"
50+ IFS=' ,' read -ra variant_arg <<< " ${2:-}"
51+
4952IFS=' ' read -ra versions <<< " $(get_versions .)"
50- IFS=' ' read -ra update_versions <<< " $(get_versions . " ${1 -} " )"
51- IFS=' ' read -ra update_variants <<< " $(get_variants . " ${2 -} " )"
53+ IFS=' ' read -ra update_versions <<< " $(get_versions . " ${versions_arg[@] : - } " )"
54+ IFS=' ' read -ra update_variants <<< " $(get_variants . " ${variant_arg[@] : - } " )"
5255if [ ${# versions[@]} -eq 0 ]; then
5356 fatal " No valid versions found!"
5457fi
0 commit comments