From b98fdd49f436071295094117436a3942ced0f417 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 11 Mar 2016 17:37:41 +0000 Subject: [PATCH] build-docker.sh: Some small improvements for parameter handling --- build-docker.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build-docker.sh b/build-docker.sh index 48df922..2f1a4bf 100755 --- a/build-docker.sh +++ b/build-docker.sh @@ -1,4 +1,4 @@ -# /bin/bash +#!/bin/bash if [[ -z "$1" ]]; then echo "Usage: ./build-docker.sh def_file_name version_number" @@ -11,18 +11,18 @@ if [[ -z "$2" ]]; then fi echo "Starting build..." -cp $1 ./prosody.deb -docker build -t prosody/prosody:$2 . +cp "$1" ./prosody.deb +docker build -t prosody/prosody:"$2" . for i in "${@:3}"; do echo "Also building tag $i" - docker build -t prosody/prosody:$i . + docker build -t prosody/prosody:"$i" . done docker push prosody/prosody echo "Cleaning up..." -docker rmi prosody/prosody:$2 +docker rmi prosody/prosody:"$2" for i in "${@:3}"; do echo "Also cleaning tag $i" - docker rmi prosody/prosody:$i + docker rmi prosody/prosody:"$i" done rm ./prosody.deb