Files
crawlab/backend/scripts/install-go.sh
2020-07-31 13:13:49 +08:00

24 lines
333 B
Bash

#!/bin/bash
# fail immediately if error
set -e
# lock global
touch /tmp/install.lock
# lock
touch /tmp/install-go.lock
# install golang
apt-get update
apt-get install -y golang
# environment variables
export GOPROXY=https://goproxy.cn
export GOPATH=/opt/go
# unlock global
rm /tmp/install.lock
# unlock
rm /tmp/install-go.lock