浏览代码

Check that architecture is detected when installing Go #72

Bob Mottram 8 年前
父节点
当前提交
da5d4d25ba
共有 2 个文件被更改,包括 9 次插入0 次删除
  1. 4
    0
      src/freedombone-image-customise
  2. 5
    0
      src/freedombone-utils-go

+ 4
- 0
src/freedombone-image-customise 查看文件

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

+ 5
- 0
src/freedombone-utils-go 查看文件

163
             echo $"Using $GOARCH"
163
             echo $"Using $GOARCH"
164
         fi
164
         fi
165
     fi
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
     GO_SOURCE=https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GOARCH}.tar.gz
171
     GO_SOURCE=https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GOARCH}.tar.gz
167
 
172
 
168
     if [ ! -d ${rootdir}${INSTALL_DIR} ]; then
173
     if [ ! -d ${rootdir}${INSTALL_DIR} ]; then