Skip to content

Commit

Permalink
By default, download armv6l when 'uname -m' reports armv7l.
Browse files Browse the repository at this point in the history
  • Loading branch information
udhos committed Jun 5, 2017
1 parent 29e3d56 commit dc306d9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion update-golang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ source=https://storage.googleapis.com/golang
destination=/usr/local
release=1.8.3
profiled=/etc/profile.d/golang_path.sh
arch_probe="uname -m"

os=$(uname -s | tr "[:upper:]" "[:lower:]")

arch=$(uname -m)
[ -n "$ARCH_PROBE" ] && arch_probe="$ARCH_PROBE"

arch=$($arch_probe)
case "$arch" in
i*)
arch=386
Expand All @@ -42,6 +45,9 @@ case "$arch" in
aarch64)
arch=armv6l
;;
armv7l)
arch=armv6l
;;
esac

[ -n "$SOURCE" ] && source=$SOURCE
Expand All @@ -61,6 +67,7 @@ SOURCE=$source
DESTINATION=$destination
RELEASE=$release
OS=$os
ARCH_PROBE=$arch_probe
ARCH=$arch
PROFILED=$profiled
CACHE=$cache
Expand Down
2 changes: 1 addition & 1 deletion update-golang.sh.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
38838339a6078feeb515b4969da6d4b3bdd3e0989757dd9a9ca34012c4643b97 update-golang.sh
afa2df079686628335370cd2a9f9fa8fe084c5ad64c1529d6c63180c4eb965e6 update-golang.sh

0 comments on commit dc306d9

Please sign in to comment.