@@ -16,7 +16,7 @@ fatal() {
1616 exit 1
1717}
1818
19- cd $( cd ${0%/* } && pwd -P) ;
19+ cd " $( cd " ${0%/* } " && pwd -P) " ;
2020
2121versions=( " $@ " )
2222if [ ${# versions[@]} -eq 0 ]; then
@@ -28,38 +28,38 @@ for version in "${versions[@]}"; do
2828 # Skip "docs" and other non-docker directories
2929 [ -f " $version /Dockerfile" ] || continue
3030
31- tag=$( cat $version /Dockerfile | grep " ENV NODE_VERSION" | cut -d' ' -f3)
31+ tag=$( cat " $version /Dockerfile" | grep " ENV NODE_VERSION" | cut -d' ' -f3)
3232
3333 info " Building $tag ..."
3434
35- if ! docker build -t node:$tag $version ; then
35+ if ! docker build -t node:" $tag " " $version " ; then
3636 fatal " Build of $tag failed!"
3737 else
3838 info " Build of $tag succeeded."
3939 fi
4040
41- OUTPUT=$( docker run --rm -it node:$tag node -e " process.stdout.write(process.versions.node)" )
41+ OUTPUT=$( docker run --rm -it node:" $tag " node -e " process.stdout.write(process.versions.node)" )
4242 if [ " $OUTPUT " != " $tag " ]; then
4343 fatal " Test of $tag failed!"
4444 else
4545 info " Test of $tag succeeded."
4646 fi
4747
48- variants=$( echo $version /* / | xargs -n1 basename)
48+ variants=$( echo " $version " /* / | xargs -n1 basename)
4949
5050 for variant in $variants ; do
5151 # Skip non-docker directories
5252 [ -f " $version /$variant /Dockerfile" ] || continue
53-
53+
5454 info " Building $tag -$variant variant..."
5555
56- if ! docker build -t node:$tag -$variant $version /$variant ; then
56+ if ! docker build -t node:" $tag -$variant " " $version /$variant " ; then
5757 fatal " Build of $tag -$variant failed!"
5858 else
5959 info " Build of $tag -$variant succeeded."
6060 fi
6161
62- OUTPUT=$( docker run --rm -it node:$tag -$variant node -e " process.stdout.write(process.versions.node)" )
62+ OUTPUT=$( docker run --rm -it node:" $tag -$variant " node -e " process.stdout.write(process.versions.node)" )
6363 if [ " $OUTPUT " != " $tag " ]; then
6464 fatal " Test of $tag -$variant failed!"
6565 else
0 commit comments