From 26c5a2656523a87b457322e193fcc544f22d0431 Mon Sep 17 00:00:00 2001 From: TerraTech Date: Fri, 11 Nov 2016 17:05:08 -0500 Subject: [PATCH] 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 --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index cd135f5..1b8b09b 100644 --- a/Makefile +++ b/Makefile @@ -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