2015-07-23 17:00:37 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2015-07-24 20:59:58 +00:00
|
|
|
go install -a -v ./gosuper
|
2015-07-23 21:14:50 +00:00
|
|
|
RETURN_VALUE=$?
|
2015-07-23 17:00:37 +00:00
|
|
|
|
2015-08-03 19:06:03 +00:00
|
|
|
HOSTARCH=$(uname -m)
|
2015-07-23 17:00:37 +00:00
|
|
|
# For consistency, always keep the binary within a linux_$GOARCH folder
|
2015-08-03 19:06:03 +00:00
|
|
|
if [[ ( $GOARCH == "amd64" && $HOSTARCH == "x86_64" ) || ( $GOARCH == "arm" && $HOSTARCH == "armv7l" ) ]]; then
|
|
|
|
mkdir -p $GOPATH/bin/linux_$GOARCH
|
2015-07-23 17:00:37 +00:00
|
|
|
cp $GOPATH/bin/gosuper $GOPATH/bin/linux_$GOARCH/
|
|
|
|
fi
|
2015-07-23 21:14:50 +00:00
|
|
|
chown -R $USER_ID:$GROUP_ID $GOPATH/bin
|
|
|
|
|
|
|
|
exit $RETURN_VALUE
|