From 18123531a5ea96a0f17640e1036b32109d7de61b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= Date: Mon, 4 Aug 2014 15:12:26 +0200 Subject: [PATCH] Improve error message to include the distribution that is failing to build --- build_all.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build_all.sh b/build_all.sh index 638f303..31f1513 100755 --- a/build_all.sh +++ b/build_all.sh @@ -2,6 +2,7 @@ set -e +KALI_DIST=kali KALI_VERSION="${VERSION:-daily}" TARGET_DIR=$(dirname $0)/images/kali-$KALI_VERSION @@ -47,16 +48,19 @@ if [ -n "$OPT_kali_rolling" ]; then if [ "$KALI_VERSION" = "daily" ]; then KALI_VERSION="rolling" fi + KALI_DIST="kali-rolling" elif [ -n "$OPT_kali_dev" ]; then echo "Using kali-dev as the base distribution" KALI_CONFIG_OPTS="$KALI_CONFIG_OPTS --kali-dev" if [ "$KALI_VERSION" = "daily" ]; then KALI_VERSION="dev" fi + KALI_DIST="kali-dev" fi if [ -n "$OPT_pu" ]; then echo "Integrating proposed-updates in the image" KALI_CONFIG_OPTS="$KALI_CONFIG_OPTS --proposed-updates" + KALI_DIST="$KALI_DIST+pu" fi # Set sane PATH (cron seems to lack /sbin/ dirs) @@ -80,7 +84,7 @@ for KALI_ARCH in $KALI_ARCHES; do lb config -a $KALI_ARCH $KALI_CONFIG_OPTS >>prepare.log 2>&1 lb build >/dev/null if [ $? -ne 0 ] || [ ! -e $IMAGE_NAME ]; then - echo "Build of $KALI_ARCH live image failed" >&2 + echo "Build of $KALI_DIST/$KALI_ARCH live image failed" >&2 echo "Last 50 lines of the log:" >&2 tail -n 50 binary.log >&2 exit 1