diff options
author | MCApollo <34170230+MCApollo@users.noreply.github.com> | 2019-05-10 06:32:12 +0000 |
---|---|---|
committer | MCApollo <34170230+MCApollo@users.noreply.github.com> | 2019-05-10 06:32:12 +0000 |
commit | a2dae7da3a67dfcef7e1db3da4da79545ff69d10 (patch) | |
tree | b08bfe5db23a4e3176490c20783a7fc4e0b601b3 /data/golang/bootstrap.sh | |
parent | 5653d29a4329dc4a7c4f9faae615e139fdb94ebf (diff) |
Added golang.
Diffstat (limited to 'data/golang/bootstrap.sh')
-rwxr-xr-x | data/golang/bootstrap.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/data/golang/bootstrap.sh b/data/golang/bootstrap.sh new file mode 100755 index 000000000..3cf75814d --- /dev/null +++ b/data/golang/bootstrap.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# Bootstraps go to compile go. +set -e + +darwin='https://storage.googleapis.com/golang/go1.11.10.darwin-amd64.tar.gz' +linux='https://storage.googleapis.com/golang/go1.11.10.linux-amd64.tar.gz' +url='' + +case "$(uname)" in + Linux) + url=${linux} + ;; + Darwin) + url=${darwin} + ;; + *) + echo "$0 - Unknown system." + exit 1 + ;; +esac + +cd $(mktemp -d 2>/dev/null || mktemp -d -t 'mytmpdir') +wget ${url} >/dev/null +tar xvf ${url##*/} >/dev/null +echo $PWD/go/ |