Squashed 'golang-install/' changes from 258f94f..2bb9d3b

2bb9d3b Adjust i686 architecture to point to the 386's release
f4cf04a Updated to output a new line before inserting variables into the shell profile file
bfd24d9 Update to Go 1.20.6
9651981 Update goinstall.sh (#69)

git-subtree-dir: golang-install
git-subtree-split: 2bb9d3b603709fcbe2fb27b26c70bf0ffee0d4dc
This commit is contained in:
2023-09-27 15:25:57 -04:00
parent 30c4288a16
commit c0011e47fa
+6 -3
View File
@@ -2,7 +2,7 @@
# shellcheck disable=SC2016
set -e
VERSION="1.18.1"
VERSION="1.20.6"
[ -z "$GOROOT" ] && GOROOT="$HOME/.go"
[ -z "$GOPATH" ] && GOPATH="$HOME/go"
@@ -25,6 +25,9 @@ case $OS in
"armv8")
ARCH=arm64
;;
"i686")
ARCH=386
;;
.*386.*)
ARCH=386
;;
@@ -143,14 +146,14 @@ echo "Configuring shell profile in: $shell_profile"
touch "$shell_profile"
if [ "$shell" == "fish" ]; then
{
echo '# GoLang'
echo -e '\n# GoLang'
echo "set GOROOT '${GOROOT}'"
echo "set GOPATH '$GOPATH'"
echo 'set PATH $GOPATH/bin $GOROOT/bin $PATH'
} >> "$shell_profile"
else
{
echo '# GoLang'
echo -e '\n# GoLang'
echo "export GOROOT=${GOROOT}"
echo 'export PATH=$GOROOT/bin:$PATH'
echo "export GOPATH=$GOPATH"