From 29a1f07c07319f9034bd6f58a24fa0f38d96cd0a Mon Sep 17 00:00:00 2001 From: Jo Vandeginste Date: Fri, 11 Sep 2015 18:19:22 +0200 Subject: [PATCH] Add quotes to locations in case pwd contains spaces --- scripts/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 5f08688a1..e4941215d 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -9,7 +9,7 @@ while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )" # Change into that directory -cd $DIR +cd "$DIR" # Get the git commit GIT_COMMIT=$(git rev-parse HEAD) @@ -49,4 +49,4 @@ go build \ -ldflags "${CGO_LDFLAGS} -X main.GitCommit ${GIT_COMMIT}${GIT_DIRTY} -X main.GitDescribe ${GIT_DESCRIBE}" \ -v \ -o bin/consul${EXTENSION} -cp bin/consul${EXTENSION} ${GOPATHSINGLE}/bin +cp bin/consul${EXTENSION} "${GOPATHSINGLE}/bin"