From f0760da2f52019622925395e5174dd68039469fe Mon Sep 17 00:00:00 2001 From: Clemens John Date: Thu, 19 Sep 2013 18:40:28 +0000 Subject: [PATCH] Add buildall option to buildscript that builds the firmware images for all routers for a given community Signed-off-by: Clemens John --- buildscript | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/buildscript b/buildscript index 9c1c188..57856f9 100755 --- a/buildscript +++ b/buildscript @@ -113,6 +113,16 @@ clean() { /bin/rm -rf bin $builddir } +buildall() { + for bsp in $(/bin/ls bsp/*.bsp) + do + ./buildscript selectcommunity $1 + ./buildscript selectbsp $bsp + ./buildscript prepare + ./buildscript build + done +} + routers() { echo "router-types: " echo " dir300" @@ -125,7 +135,7 @@ routers() { echo " wr1043nd" } -if [ "$1" != "selectbsp" -a "$1" != "selectcommunity" ]; then +if [ "$1" != "selectbsp" -a "$1" != "selectcommunity" -a "$1" != "buildall" ]; then if [ ! -h selected_bsp ]; then echo "Please select a Board-Support-Package using:" echo "$0 selectbsp" @@ -231,6 +241,16 @@ case "$1" in clean fi ;; + "buildall") + if [ "$2" = "help" ] || [ "$2" = "" ]; then + echo "This option builds the firmware for all routers of a given community." + echo "Usage: $0 $1 community.cfg" + echo "community.cfg: " + /bin/ls community/*.cfg + else + buildall $2 + fi + ;; *) echo "This is the Build Environment Script of the Freifunk Community Oldenburg." echo "Usage: $0 command"