Makefile: Fix bashism when building on Ubuntu + dash

Reference: https://wiki.ubuntu.com/DashAsBinSh#A.5B

 Ubuntu's /bin/sh is /bin/dash and '==' triggers an error:
 >> /bin/sh: 1: [: amd64: unexpected operator
This commit is contained in:
TerraTech 2016-11-11 17:05:08 -05:00
parent 5b24e1793d
commit 26c5a26565
1 changed files with 2 additions and 2 deletions

View File

@ -112,7 +112,7 @@ container: .container-$(DOTFILE_IMAGE) container-name
Dockerfile.in > .dockerfile-$(ARCH)
@docker build -t $(IMAGE):$(VERSION) -f .dockerfile-$(ARCH) .
@docker images -q $(IMAGE):$(VERSION) > $@
@if [ "$(ARCH)" == "amd64" ]; then \
@if [ "$(ARCH)" = "amd64" ]; then \
docker tag $(IMAGE):$(VERSION) $(LEGACY_IMAGE):$(VERSION); \
fi
@ -123,7 +123,7 @@ push: .push-$(DOTFILE_IMAGE) push-name
.push-$(DOTFILE_IMAGE): .container-$(DOTFILE_IMAGE)
@gcloud docker push $(IMAGE):$(VERSION)
@docker images -q $(IMAGE):$(VERSION) > $@
@if [ "$(ARCH)" == "amd64" ]; then \
@if [ "$(ARCH)" = "amd64" ]; then \
gcloud docker push $(LEGACY_IMAGE):$(VERSION); \
fi