@@ -7,15 +7,16 @@ 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
19+ - update.sh . alpine # Update the alpine variant for all versions
1920
2021 OPTIONS:
2122 -s Security update; skip updating the yarn and alpine versions.
4647
4748cd " $( cd " ${0%/* } " && pwd -P) "
4849
50+ IFS=' ,' read -ra versions_arg <<< " ${1:-}"
51+ IFS=' ,' read -ra variant_arg <<< " ${2:-}"
52+
4953IFS=' ' read -ra versions <<< " $(get_versions .)"
50- IFS=' ' read -ra update_versions <<< " $(get_versions . " ${1 -} " )"
51- IFS=' ' read -ra update_variants <<< " $(get_variants . " ${2 -} " )"
54+ IFS=' ' read -ra update_versions <<< " $(get_versions . " ${versions_arg[@] : - } " )"
55+ IFS=' ' read -ra update_variants <<< " $(get_variants . " ${variant_arg[@] : - } " )"
5256if [ ${# versions[@]} -eq 0 ]; then
5357 fatal " No valid versions found!"
5458fi
0 commit comments