From 8a656da584c5b2e21571e2675e307b1f9f621d17 Mon Sep 17 00:00:00 2001 From: Sophie Brun Date: Fri, 8 Oct 2021 14:43:23 +0200 Subject: [PATCH] Fix the exit code of build_all_firmwares.sh The command " $STATS && ( LANG=C arm-none-eabi-size armsrc/obj/[hl]f_*.o |grep -v "filename" >> standalones_stats.txt )" is always false when $STATS is false (by default). So the exit code of the script is "1" and the build in Kali fails. --- tools/build_all_firmwares.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/build_all_firmwares.sh b/tools/build_all_firmwares.sh index 87c95033f..1d324da1f 100755 --- a/tools/build_all_firmwares.sh +++ b/tools/build_all_firmwares.sh @@ -42,7 +42,7 @@ for mode in "${STANDALONE_MODES[@]}"; do make $MKFLAGS PLATFORM=PM3GENERIC PLATFORM_EXTRAS= STANDALONE=$mode fullimage || exit 1 chmod 644 armsrc/obj/fullimage.elf mv armsrc/obj/fullimage.elf "$DEST/PM3GENERIC_${mode/_/}.elf" - $STATS && ( LANG=C arm-none-eabi-size armsrc/obj/[hl]f_*.o |grep -v "filename" >> standalones_stats.txt ) + ! $STATS || ( LANG=C arm-none-eabi-size armsrc/obj/[hl]f_*.o |grep -v "filename" >> standalones_stats.txt ) done # PM3RDV4 @@ -57,7 +57,7 @@ for mode in "${STANDALONE_MODES[@]}"; do make $MKFLAGS PLATFORM=PM3RDV4 PLATFORM_EXTRAS= STANDALONE=$mode fullimage || exit 1 chmod 644 armsrc/obj/fullimage.elf mv armsrc/obj/fullimage.elf "$DEST/PM3RDV4_${mode/_/}.elf" - $STATS && ( LANG=C arm-none-eabi-size armsrc/obj/[hl]f_*.o |grep -v "filename" >> standalones_stats.txt ) + ! $STATS || ( LANG=C arm-none-eabi-size armsrc/obj/[hl]f_*.o |grep -v "filename" >> standalones_stats.txt ) done # PM4RDV4 + BTADDON @@ -71,5 +71,5 @@ for mode in "${STANDALONE_MODES[@]}"; do make $MKFLAGS PLATFORM=PM3RDV4 PLATFORM_EXTRAS=BTADDON STANDALONE=$mode fullimage || exit 1 chmod 644 armsrc/obj/fullimage.elf mv armsrc/obj/fullimage.elf "$DEST/PM3RDV4_BTADDON_${mode/_/}.elf" - $STATS && ( LANG=C arm-none-eabi-size armsrc/obj/[hl]f_*.o |grep -v "filename" >> standalones_stats.txt ) + ! $STATS || ( LANG=C arm-none-eabi-size armsrc/obj/[hl]f_*.o |grep -v "filename" >> standalones_stats.txt ) done