Merge pull request #1135 from justincormack/reuse-hyperkit

Use hyperkit and slirp from Docker for Mac install if available
This commit is contained in:
Justin Cormack 2017-02-02 09:07:54 +00:00 committed by GitHub
commit 2b1a26e5df

View File

@ -36,14 +36,25 @@ qemu-gce: alpine/gce.img.tar.gz
bin: bin:
mkdir -p $@ mkdir -p $@
DOCKER_HYPERKIT=/Applications/Docker.app/Contents/MacOS/com.docker.hyperkit
DOCKER_SLIRP=/Applications/Docker.app/Contents/MacOS/com.docker.slirp
bin/com.docker.hyperkit: | bin bin/com.docker.hyperkit: | bin
ifneq ("$(wildcard $(DOCKER_HYPERKIT))","")
ln -s $(DOCKER_HYPERKIT) $@
else
curl -fsSL https://circleci.com/api/v1/project/docker/hyperkit/latest/artifacts/0//Users/distiller/hyperkit/build/com.docker.hyperkit > $@ curl -fsSL https://circleci.com/api/v1/project/docker/hyperkit/latest/artifacts/0//Users/distiller/hyperkit/build/com.docker.hyperkit > $@
chmod a+x $@ chmod a+x $@
endif
bin/com.docker.slirp: | bin bin/com.docker.slirp: | bin
ifneq ("$(wildcard $(DOCKER_SLIRP))","")
ln -s $(DOCKER_SLIRP) $@
else
curl -fsSL https://circleci.com/api/v1/project/docker/vpnkit/latest/artifacts/0//Users/distiller/vpnkit/com.docker.slirp.tgz \ curl -fsSL https://circleci.com/api/v1/project/docker/vpnkit/latest/artifacts/0//Users/distiller/vpnkit/com.docker.slirp.tgz \
| tar xz --strip=2 -C $(dir $@) Contents/MacOS/com.docker.slirp | tar xz --strip=2 -C $(dir $@) Contents/MacOS/com.docker.slirp
touch $@ touch $@
endif
bin/regextract: | bin bin/regextract: | bin
curl -fsSL https://circleci.com/api/v1/project/justincormack/regextract/latest/artifacts/0/\$$CIRCLE_ARTIFACTS/darwin/amd64/regextract > $@ curl -fsSL https://circleci.com/api/v1/project/justincormack/regextract/latest/artifacts/0/\$$CIRCLE_ARTIFACTS/darwin/amd64/regextract > $@