From da5d4d25ba73e171dcf030f9db129a189da57e2c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 18 Sep 2017 15:11:29 +0100 Subject: [PATCH] Check that architecture is detected when installing Go #72 --- src/freedombone-image-customise | 4 ++++ src/freedombone-utils-go | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 1983c9a5..7358c082 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -1167,6 +1167,10 @@ function image_setup_utils { if [[ $ARCHITECTURE == *"arm"* ]]; then GOARCH=armv6l fi + if [ ! $GOARCH ]; then + echo $'System architecture was not specified when installing Go' + exit 6734378 + fi GO_SOURCE=https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GOARCH}.tar.gz if [ ! -d ${rootdir}/root/build ]; then diff --git a/src/freedombone-utils-go b/src/freedombone-utils-go index b395fe10..df438bdd 100755 --- a/src/freedombone-utils-go +++ b/src/freedombone-utils-go @@ -163,6 +163,11 @@ function mesh_upgrade_golang { echo $"Using $GOARCH" fi fi + if [ ! $GOARCH ]; then + echo $'System architecture was not detected when installing Go' + echo "uname reports: $(uname -m)" + exit 63945284 + fi GO_SOURCE=https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GOARCH}.tar.gz if [ ! -d ${rootdir}${INSTALL_DIR} ]; then