aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Hanley <felix@userspace.com.au>2020-11-16 21:09:53 +1100
committerGitHub <noreply@github.com>2020-11-16 10:09:53 +0000
commit41c0b5acfb3bbb2a4b1985862421f6fb1b11772d (patch)
tree5e71353e378d34997d6653e1789fe817e0e5d8b5
parentcb41c992f757b3007f01460c140a06b1598d15c8 (diff)
Update build script to run on any POSIX (#1577)
Signed-off-by: Felix Hanley <felix@userspace.com.au>
-rwxr-xr-xbuild-dendritejs.sh4
-rwxr-xr-xbuild.sh4
2 files changed, 4 insertions, 4 deletions
diff --git a/build-dendritejs.sh b/build-dendritejs.sh
index cd42a6be..83ec3699 100755
--- a/build-dendritejs.sh
+++ b/build-dendritejs.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -eu
+#!/bin/sh -eu
export GIT_COMMIT=$(git rev-list -1 HEAD) && \
-GOOS=js GOARCH=wasm go build -ldflags "-X main.GitCommit=$GIT_COMMIT" -o main.wasm ./cmd/dendritejs \ No newline at end of file
+GOOS=js GOARCH=wasm go build -ldflags "-X main.GitCommit=$GIT_COMMIT" -o main.wasm ./cmd/dendritejs
diff --git a/build.sh b/build.sh
index 31e0519f..494d97ed 100755
--- a/build.sh
+++ b/build.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -eu
+#!/bin/sh -eu
# Put installed packages into ./bin
export GOBIN=$PWD/`dirname $0`/bin
@@ -7,7 +7,7 @@ if [ -d ".git" ]
then
export BUILD=`git rev-parse --short HEAD || ""`
export BRANCH=`(git symbolic-ref --short HEAD | tr -d \/ ) || ""`
- if [[ $BRANCH == "master" ]]
+ if [ "$BRANCH" = master ]
then
export BRANCH=""
fi