From 3f76df8c0fb69c15fd0dc7101bc9de59b1be0c40 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sun, 25 Jul 2021 23:49:35 -0600 Subject: allow building only some targets, instead of always doing all --- spaghetti-monster/anduril/build-all.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/spaghetti-monster/anduril/build-all.sh b/spaghetti-monster/anduril/build-all.sh index 78ebb20..b9f6d15 100755 --- a/spaghetti-monster/anduril/build-all.sh +++ b/spaghetti-monster/anduril/build-all.sh @@ -1,5 +1,12 @@ #!/bin/sh +# Usage: build-all.sh [pattern] +# If pattern given, only build targets which match. + +if [ ! -z "$1" ]; then + SEARCH="$1" +fi + UI=anduril date '+#define VERSION_NUMBER "%Y%m%d"' > version.h @@ -11,6 +18,12 @@ FAILED='' for TARGET in cfg-*.h ; do + # maybe limit builds to a specific pattern + if [ ! -z "$SEARCH" ]; then + echo "$TARGET" | grep -i "$SEARCH" > /dev/null + if [ 0 != $? ]; then continue ; fi + fi + # friendly name for this build NAME=$(echo "$TARGET" | perl -ne '/cfg-(.*).h/ && print "$1\n";') echo "===== $NAME =====" -- cgit v1.2.3