aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 86c844793..b4792a25e 100755
--- a/build.sh
+++ b/build.sh
@@ -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