Tolerate spaces in the current working directory (#9)

* Tolerate spaces in the current working directory

When $(pwd) evaluates to a string with spaces, the shell parses the
resulting arguments for binding Docker volumes incorrectly. Quote these
arguments to supply them indivisibly as intended.

* whitespace
master
Steven E. Harris 2017-08-20 01:30:05 -04:00 committed by Tim Hockin
parent b24f6ad182
commit 85f5d74317
1 changed files with 29 additions and 28 deletions

View File

@ -84,11 +84,11 @@ bin/$(ARCH)/$(BIN): build-dirs
-ti \
--rm \
-u $$(id -u):$$(id -g) \
-v $$(pwd)/.go:/go \
-v $$(pwd):/go/src/$(PKG) \
-v $$(pwd)/bin/$(ARCH):/go/bin \
-v $$(pwd)/bin/$(ARCH):/go/bin/linux_$(ARCH) \
-v $$(pwd)/.go/std/$(ARCH):/usr/local/go/pkg/linux_$(ARCH)_static \
-v "$$(pwd)/.go:/go" \
-v "$$(pwd):/go/src/$(PKG)" \
-v "$$(pwd)/bin/$(ARCH):/go/bin" \
-v "$$(pwd)/bin/$(ARCH):/go/bin/$$(go env GOOS)_$(ARCH)" \
-v "$$(pwd)/.go/std/$(ARCH):/usr/local/go/pkg/linux_$(ARCH)_static" \
-w /go/src/$(PKG) \
$(BUILD_IMAGE) \
/bin/sh -c " \
@ -133,14 +133,15 @@ test: build-dirs
-ti \
--rm \
-u $$(id -u):$$(id -g) \
-v $$(pwd)/.go:/go \
-v $$(pwd):/go/src/$(PKG) \
-v $$(pwd)/bin/$(ARCH):/go/bin \
-v $$(pwd)/.go/std/$(ARCH):/usr/local/go/pkg/linux_$(ARCH)_static \
-v "$$(pwd)/.go:/go" \
-v "$$(pwd):/go/src/$(PKG)" \
-v "$$(pwd)/bin/$(ARCH):/go/bin" \
-v "$$(pwd)/.go/std/$(ARCH):/usr/local/go/pkg/linux_$(ARCH)_static" \
-w /go/src/$(PKG) \
$(BUILD_IMAGE) \
/bin/sh -c " \
./build/test.sh $(SRC_DIRS) \
"
build-dirs: