diff options
Diffstat (limited to 'spaghetti-monster')
| -rwxr-xr-x | spaghetti-monster/anduril/build-all.sh | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/spaghetti-monster/anduril/build-all.sh b/spaghetti-monster/anduril/build-all.sh index 42a36fd..78ebb20 100755 --- a/spaghetti-monster/anduril/build-all.sh +++ b/spaghetti-monster/anduril/build-all.sh @@ -4,12 +4,41 @@ UI=anduril date '+#define VERSION_NUMBER "%Y%m%d"' > version.h +PASS=0 +FAIL=0 +PASSED='' +FAILED='' + for TARGET in cfg-*.h ; do + + # friendly name for this build NAME=$(echo "$TARGET" | perl -ne '/cfg-(.*).h/ && print "$1\n";') echo "===== $NAME =====" + + # figure out MCU type ATTINY=$(grep 'ATTINY:' $TARGET | awk '{ print $3 }') if [ -z "$ATTINY" ]; then ATTINY=85 ; fi + + # try to compile echo ../../../bin/build.sh $ATTINY "$UI" "-DCONFIGFILE=${TARGET}" ../../../bin/build.sh $ATTINY "$UI" "-DCONFIGFILE=${TARGET}" - mv -f "$UI".hex "$UI".$NAME.hex + + # track result, and rename compiled files + if [ 0 = $? ] ; then + mv -f "$UI".hex "$UI".$NAME.hex + PASS=$(($PASS + 1)) + PASSED="$PASSED $NAME" + else + echo "ERROR: build failed" + FAIL=$(($FAIL + 1)) + FAILED="$FAILED $NAME" + fi + done + +# summary +echo "===== $PASS builds succeeded, $FAIL failed =====" +#echo "PASS: $PASSED" +if [ 0 != $FAIL ]; then + echo "FAIL:$FAILED" +fi |
