Use arm64 golang download for aarch64 #72

This commit is contained in:
Bob Mottram 2017-09-18 15:38:45 +01:00
parent 2e99116062
commit 52c9c5abc7
2 changed files with 13 additions and 3 deletions

View File

@ -1164,9 +1164,12 @@ function image_setup_utils {
if [[ $ARCHITECTURE == *"amd64" || $ARCHITECTURE == "x86_64" ]]; then
GOARCH=amd64
fi
if [[ $ARCHITECTURE == *"arm"* || $ARCHITECTURE == *"aarch"* ]]; then
if [[ $ARCHITECTURE == *"arm"* ]]; then
GOARCH=armv6l
fi
if [[ $ARCHITECTURE == *"aarch"* ]]; then
GOARCH=arm64
fi
if [ ! $GOARCH ]; then
echo $'System architecture was not specified when installing Go'
exit 6734378

View File

@ -144,16 +144,23 @@ function mesh_upgrade_golang {
if [[ $ARCHITECTURE == *"amd64" || $ARCHITECTURE == "x86_64" ]]; then
GOARCH=amd64
fi
if [[ $ARCHITECTURE == *"arm"* || $ARCHITECTURE == *"aarch"* ]]; then
if [[ $ARCHITECTURE == *"arm"* ]]; then
GOARCH=armv6l
fi
if [[ $ARCHITECTURE == *"aarch"* ]]; then
GOARCH=arm64
fi
if [ ! $GOARCH ]; then
echo $'No architecture specified'
ARCHITECTURE=$(uname -m)
if [[ $ARCHITECTURE == "arm"* || $ARCHITECTURE == *"aarch"* ]]; then
if [[ $ARCHITECTURE == "arm"* ]]; then
GOARCH=armv6l
echo $"Using $GOARCH"
fi
if [[ $ARCHITECTURE == *"aarch"* ]]; then
GOARCH=arm64
echo $"Using $GOARCH"
fi
if [[ $ARCHITECTURE == "amd"* || $ARCHITECTURE == "x86_64" ]]; then
GOARCH=amd64
echo $"Using $GOARCH"