diff --git a/build_all.sh b/build_all.sh index e175d5d..dfef7fd 100755 --- a/build_all.sh +++ b/build_all.sh @@ -2,9 +2,22 @@ set -e -KALI_ARCHES="amd64 i386" KALI_VERSION="${VERSION:-daily}" +HOST_ARCH="$(dpkg --print-architecture)" +case "$HOST_ARCH" in + i386|amd64) + KALI_ARCHES="amd64 i386" + ;; + armel|armhf) + KALI_ARCHES="armhf armel" + ;; + *) + echo "WARNING: $HOST_ARCH build is not tested" + KALI_ARCHES="$HOST_ARCH" + ;; +esac + # Set sane PATH (cron seems to lack /sbin/ dirs) export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" @@ -15,7 +28,10 @@ cd $(dirname $0) for KALI_ARCH in $KALI_ARCHES; do lb clean --purge >prepare.log 2>&1 - lb config --architecture $KALI_ARCH >>prepare.log 2>&1 + if [ "$KALI_ARCH" = "i386" ]; then + CONFIG_OPTS="--linux-flavours 686-pae" + fi + lb config --architecture $KALI_ARCH $CONFIG_OPTS >>prepare.log 2>&1 lb build >/dev/null if [ ! -e binary.hybrid.iso ]; then echo "Build of $KALI_ARCH live image failed" >&2