Преглед на файлове

Check that architecture is detected when installing Go #72

Bob Mottram преди 7 години
родител
ревизия
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