Check that architecture is detected when installing Go #72

This commit is contained in:
Bob Mottram 2017-09-18 15:11:29 +01:00
parent 3039df100b
commit da5d4d25ba
2 changed files with 9 additions and 0 deletions

View File

@ -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

View File

@ -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