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 if [[ $ARCHITECTURE == *"amd64" || $ARCHITECTURE == "x86_64" ]]; then
GOARCH=amd64 GOARCH=amd64
fi fi
if [[ $ARCHITECTURE == *"arm"* || $ARCHITECTURE == *"aarch"* ]]; then if [[ $ARCHITECTURE == *"arm"* ]]; then
GOARCH=armv6l GOARCH=armv6l
fi fi
if [[ $ARCHITECTURE == *"aarch"* ]]; then
GOARCH=arm64
fi
if [ ! $GOARCH ]; then if [ ! $GOARCH ]; then
echo $'System architecture was not specified when installing Go' echo $'System architecture was not specified when installing Go'
exit 6734378 exit 6734378

View File

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