Browse Source

Check that architecture is detected when installing Go #72

Bob Mottram 7 years ago
parent
commit
da5d4d25ba
2 changed files with 9 additions and 0 deletions
  1. 4
    0
      src/freedombone-image-customise
  2. 5
    0
      src/freedombone-utils-go

+ 4
- 0
src/freedombone-image-customise View File

@@ -1167,6 +1167,10 @@ function image_setup_utils {
1167 1167
     if [[ $ARCHITECTURE == *"arm"* ]]; then
1168 1168
         GOARCH=armv6l
1169 1169
     fi
1170
+    if [ ! $GOARCH ]; then
1171
+        echo $'System architecture was not specified when installing Go'
1172
+        exit 6734378
1173
+    fi
1170 1174
     GO_SOURCE=https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GOARCH}.tar.gz
1171 1175
 
1172 1176
     if [ ! -d ${rootdir}/root/build ]; then

+ 5
- 0
src/freedombone-utils-go View File

@@ -163,6 +163,11 @@ function mesh_upgrade_golang {
163 163
             echo $"Using $GOARCH"
164 164
         fi
165 165
     fi
166
+    if [ ! $GOARCH ]; then
167
+        echo $'System architecture was not detected when installing Go'
168
+        echo "uname reports: $(uname -m)"
169
+        exit 63945284
170
+    fi
166 171
     GO_SOURCE=https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GOARCH}.tar.gz
167 172
 
168 173
     if [ ! -d ${rootdir}${INSTALL_DIR} ]; then