mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-30 10:38:55 +00:00
15 lines
412 B
Bash
15 lines
412 B
Bash
#!/bin/bash
|
|
|
|
go install -a -v ./gosuper
|
|
RETURN_VALUE=$?
|
|
|
|
HOSTARCH=$(uname -m)
|
|
# For consistency, always keep the binary within a linux_$GOARCH folder
|
|
if [[ ( $GOARCH == "amd64" && $HOSTARCH == "x86_64" ) || ( $GOARCH == "arm" && $HOSTARCH == "armv7l" ) ]]; then
|
|
mkdir -p $GOPATH/bin/linux_$GOARCH
|
|
cp $GOPATH/bin/gosuper $GOPATH/bin/linux_$GOARCH/
|
|
fi
|
|
chown -R $USER_ID:$GROUP_ID $GOPATH/bin
|
|
|
|
exit $RETURN_VALUE
|