diff --git a/.gitignore b/.gitignore index 430605b..33a387c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ binary.* +prepare.log binary +images cache chroot .stage diff --git a/auto/clean b/auto/clean index 9a4e671..d734e95 100755 --- a/auto/clean +++ b/auto/clean @@ -3,4 +3,4 @@ lb clean noauto "$@" rm -f config/binary config/bootstrap \ config/chroot config/common config/source -rm -f binary.log +rm -f binary.log prepare.log diff --git a/build_all.sh b/build_all.sh index 8dadd28..7e9fd4a 100755 --- a/build_all.sh +++ b/build_all.sh @@ -2,13 +2,24 @@ set -e -ARCHES="i386 amd64" -DATE=$(date +%Y%m%d) - -for ARCH in ARCHES; do - lb clean --purge - lb config --architecture $ARCH - lb build - mv binary.iso kali-$ARCH.iso +KALI_ARCHES="i386 amd64" +KALI_VERSION="${VERSION:-daily}" + +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 + lb build >/dev/null + if [ ! -e binary.iso ]; 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.iso images/kali-$KALI_VERSION-$KALI_ARCH.iso + mv binary.log images/kali-$KALI_VERSION-$KALI_ARCH.log done +sha1sum images/*.iso >>images/SHA1SUMS +