diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2020-04-09 11:33:22 -0400 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2020-04-09 11:33:22 -0400 |
| commit | c10df2fe85e06efb509a889bd7aae8ab5dc3a512 (patch) | |
| tree | 3a9f448becf3f06350afffa641768a6f5624fd4e /build.sh | |
| parent | 9eab678487e107939e206ec66b0f573463486082 (diff) | |
Improve dpkg handling in build.sh
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -34,7 +34,7 @@ list_platforms() { } do_build_native() { - if [[ $( dpkg --print-architecture | head -1 ) != "${PLATFORM##*.}" ]]; then + if [[ -f $( which dpkg ) && $( 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 @@ -43,7 +43,7 @@ do_build_native() { } do_build_docker() { - if ! dpkg --print-architecture | grep -q 'amd64'; then + if [[ -f $( which dpkg ) && $( dpkg --print-architecture | head -1 ) != "amd64" ]]; then echo "Docker-based builds only support amd64-based cross-building; use a 'native' build instead." exit 1 fi |
