From b350a99becc957f9f6e00d4c252db8d9b8333904 Mon Sep 17 00:00:00 2001 From: Nathan LeClaire Date: Mon, 15 Dec 2014 14:12:17 -0800 Subject: [PATCH] Allow optional override of os and arch in build With this change machine will still cross-compile for all supported OSes / archs by default, but allows user to customize args to the build script. Signed-off-by: Nathan LeClaire --- script/build | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/script/build b/script/build index 8feb1cf205..cbe72a493e 100755 --- a/script/build +++ b/script/build @@ -1,5 +1,12 @@ #!/bin/sh set -e + +if [ -z "$1" ]; then + OS_ARCH_ARG=(-os="darwin linux windows") +else + OS_ARCH_ARG=($1) +fi + rm -f machine_* docker build -t docker-machine . -exec docker run --rm -v `pwd`:/go/src/github.com/docker/machine docker-machine gox -os="darwin linux windows" +exec docker run --rm -v `pwd`:/go/src/github.com/docker/machine docker-machine gox "${OS_ARCH_ARG[@]}"