Browse Source

Only support cross-building with Docker

Joshua M. Boniface 5 years ago
parent
commit
163cf223aa
1 changed files with 5 additions and 1 deletions
  1. 5 1
      build.sh

+ 5 - 1
build.sh

@@ -34,13 +34,17 @@ list_platforms() {
 }
 
 do_build_native() {
+    if [[ $( dpkg --print-architecture | head -1 ) != "${PLATFORM##*.}" ]]; then
+        echo "Cross-building is not supported for native builds, use 'docker' builds on amd64 for cross-building."
+        exit 1
+    fi
     export IS_DOCKER=NO
     deployment/build.${PLATFORM}
 }
 
 do_build_docker() {
     if ! dpkg --print-architecture | grep -q 'amd64'; then
-        echo "Docker-based builds only support amd64-based cross-building; use a native build instead"
+        echo "Docker-based builds only support amd64-based cross-building; use a 'native' build instead."
         exit 1
     fi
     if [[ ! -f deployment/Dockerfile.${PLATFORM} ]]; then