|
|
|
@ -7,14 +7,22 @@ KALI_VERSION="${VERSION:-daily}"
|
|
|
|
|
HOST_ARCH="$(dpkg --print-architecture)"
|
|
|
|
|
case "$HOST_ARCH" in
|
|
|
|
|
i386|amd64)
|
|
|
|
|
CONFIG_OPTS="--debian-installer live"
|
|
|
|
|
if [ "$KALI_ARCH" = "i386" ]; then
|
|
|
|
|
CONFIG_OPTS="$CONFIG_OPTS --linux-flavours 686-pae"
|
|
|
|
|
fi
|
|
|
|
|
KALI_ARCHES="amd64 i386"
|
|
|
|
|
IMAGE_NAME="binary.hybrid.iso"
|
|
|
|
|
;;
|
|
|
|
|
armel|armhf)
|
|
|
|
|
KALI_ARCHES="armhf armel"
|
|
|
|
|
# Can only generate images for the host arch
|
|
|
|
|
CONFIG_OPTS="--binary-images hdd"
|
|
|
|
|
KALI_ARCHES="$HOST_ARCH"
|
|
|
|
|
IMAGE_NAME="binary.img"
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
echo "WARNING: $HOST_ARCH build is not tested"
|
|
|
|
|
KALI_ARCHES="$HOST_ARCH"
|
|
|
|
|
echo "ERROR: $HOST_ARCH build is not supported"
|
|
|
|
|
exit 1
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
@ -28,21 +36,18 @@ cd $(dirname $0)
|
|
|
|
|
|
|
|
|
|
for KALI_ARCH in $KALI_ARCHES; do
|
|
|
|
|
lb clean --purge >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
|
|
|
|
|
if [ $? -ne 0 ] || [ ! -e $IMAGE_NAME ]; then
|
|
|
|
|
echo "Build of $KALI_ARCH live image failed" >&2
|
|
|
|
|
echo "Last 50 lines of the log:" >&2
|
|
|
|
|
tail -n 50 binary.log >&2
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
mv binary.hybrid.iso images/kali-$KALI_VERSION-$KALI_ARCH.iso
|
|
|
|
|
mv $IMAGE_NAME images/kali-$KALI_VERSION-$KALI_ARCH.${IMAGE_NAME##*.}
|
|
|
|
|
mv binary.log images/kali-$KALI_VERSION-$KALI_ARCH.log
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
cd images
|
|
|
|
|
sha1sum *.iso >SHA1SUMS
|
|
|
|
|
sha1sum *.${IMAGE_NAME##*.} >SHA1SUMS
|
|
|
|
|
|
|
|
|
|