Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 11 additions & 19 deletions apps/golang/install
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,18 @@ VERSION="1.19.2"
[ -z "$GOROOT" ] && GOROOT="$HOME/.go"
[ -z "$GOPATH" ] && GOPATH="$HOME/go"

OS="$(uname -s)"
ARCH="$(uname -m)"

case $OS in
"Linux")
case $ARCH in
"aarch64")
ARCH=arm64
;;
"armv6" | "armv7l")
ARCH=armv6l
;;
"armv8")
ARCH=arm64
;;
esac
PLATFORM="linux-$ARCH"
case "$arch" in
"64")
ARCH="arm64"
;;

esac
"32")
ARCH="armv6l"
;;
*)
error "arch variable is not set, can not continue"
PLATFORM="linux-$ARCH"
Comment thread
theofficialgman marked this conversation as resolved.
Outdated
;;
esac
Comment thread
theofficialgman marked this conversation as resolved.
Outdated

if [ -z "$PLATFORM" ]; then
echo "Your operating system is not supported by the script."
Expand Down