[1/4] buildscript: buildall: remove community parameter

Submitted by Tim Niemeyer on May 14, 2016, 2:36 p.m.

Details

Message ID 1463236588-29393-1-git-send-email-tim@tn-x.org
State Accepted, archived
Headers show

Commit Message

Tim Niemeyer May 14, 2016, 2:36 p.m.
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
---

 buildscript | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

Patch hide | download patch | download mbox

diff --git a/buildscript b/buildscript
index 7e16687..d6e4d51 100755
--- a/buildscript
+++ b/buildscript
@@ -316,14 +316,13 @@  clean() {
 
 buildall() {
     for bsp in $(/bin/ls bsp/*.bsp); do
-        ./buildscript selectcommunity "$1"
         ./buildscript selectbsp "$bsp"
         ./buildscript prepare
-        ./buildscript build "$2"
+        ./buildscript build "$1"
     done
 }
 
-if [ "$1" != "selectbsp" -a "$1" != "selectcommunity" -a "$1" != "buildall" ]; then
+if [ "$1" != "selectbsp" -a "$1" != "selectcommunity" ]; then
     if [ ! -h selected_bsp ]; then
         echo "Please select a Board-Support-Package using:"
         echo "$0 selectbsp"
@@ -422,15 +421,13 @@  case "$1" in
         fi
         ;;
     "buildall")
-        if [ "$2" = "help" ] || [ "$2" = "" ]; then
+        if [ "$1" = "help" ]; then
             echo "This option builds the firmware for all routers of a given community."
             echo
-            echo "Usage: $0 $1 <community-file> [fast]"
-            echo "available community-files: "
-            /bin/ls community/*.cfg
+            echo "Usage: $0 $1 [fast]"
             echo
         else
-            buildall "$2" "$3"
+            buildall "$2"
         fi
         ;;
     "release")
@@ -453,7 +450,7 @@  case "$1" in
         echo "  prepare"
         echo "  config openwrt"
         echo "  build [fast|debug]"
-        echo "  buildall <community-file> [fast]"
+        echo "  buildall [fast]"
         echo "  release [all] [fast]"
         echo "  clean"
         echo ""

Comments

Jan Kraus May 14, 2016, 3:59 p.m.
Hi,

Am Samstag, den 14.05.2016, 16:36 +0200 schrieb Tim Niemeyer:
> Signed-off-by: Tim Niemeyer <tim@tn-x.org>
> ---
> 
>  buildscript | 15 ++++++---------
>  1 file changed, 6 insertions(+), 9 deletions(-)
> 
> diff --git a/buildscript b/buildscript
> index 7e16687..d6e4d51 100755
> --- a/buildscript
> +++ b/buildscript
> @@ -316,14 +316,13 @@ clean() {
>  
>  buildall() {
>      for bsp in $(/bin/ls bsp/*.bsp); do
> -        ./buildscript selectcommunity "$1"
>          ./buildscript selectbsp "$bsp"
>          ./buildscript prepare
> -        ./buildscript build "$2"
> +        ./buildscript build "$1"
>      done
>  }
>  
> -if [ "$1" != "selectbsp" -a "$1" != "selectcommunity" -a "$1" != "buildall" ]; then
> +if [ "$1" != "selectbsp" -a "$1" != "selectcommunity" ]; then
>      if [ ! -h selected_bsp ]; then
>          echo "Please select a Board-Support-Package using:"
>          echo "$0 selectbsp"
> @@ -422,15 +421,13 @@ case "$1" in
>          fi
>          ;;
>      "buildall")
> -        if [ "$2" = "help" ] || [ "$2" = "" ]; then
> +        if [ "$1" = "help" ]; then
Hier müsste man meiner Meinung nach immernoch auf $2 prüfen, da in $1 ja
"buildall" drin steht. Somit wird die Hilfe nie wieder angezeigt.

Grüße Jan
>              echo "This option builds the firmware for all routers of a given community."
>              echo
> -            echo "Usage: $0 $1 <community-file> [fast]"
> -            echo "available community-files: "
> -            /bin/ls community/*.cfg
> +            echo "Usage: $0 $1 [fast]"
>              echo
>          else
> -            buildall "$2" "$3"
> +            buildall "$2"
>          fi
>          ;;
>      "release")
> @@ -453,7 +450,7 @@ case "$1" in
>          echo "  prepare"
>          echo "  config openwrt"
>          echo "  build [fast|debug]"
> -        echo "  buildall <community-file> [fast]"
> +        echo "  buildall [fast]"
>          echo "  release [all] [fast]"
>          echo "  clean"
>          echo ""
> -- 
> 2.1.4
>
Tim Niemeyer May 15, 2016, 3:01 p.m.
Am Samstag, den 14.05.2016, 17:59 +0200 schrieb mayosemmel:
> Hi,
> 
> Am Samstag, den 14.05.2016, 16:36 +0200 schrieb Tim Niemeyer:
> > Signed-off-by: Tim Niemeyer <tim@tn-x.org>
> > ---
> > 
> >  buildscript | 15 ++++++---------
> >  1 file changed, 6 insertions(+), 9 deletions(-)
> > 
> > diff --git a/buildscript b/buildscript
> > index 7e16687..d6e4d51 100755
> > --- a/buildscript
> > +++ b/buildscript
> > @@ -316,14 +316,13 @@ clean() {
> >  
> >  buildall() {
> >      for bsp in $(/bin/ls bsp/*.bsp); do
> > -        ./buildscript selectcommunity "$1"
> >          ./buildscript selectbsp "$bsp"
> >          ./buildscript prepare
> > -        ./buildscript build "$2"
> > +        ./buildscript build "$1"
> >      done
> >  }
> >  
> > -if [ "$1" != "selectbsp" -a "$1" != "selectcommunity" -a "$1" != "buildall" ]; then
> > +if [ "$1" != "selectbsp" -a "$1" != "selectcommunity" ]; then
> >      if [ ! -h selected_bsp ]; then
> >          echo "Please select a Board-Support-Package using:"
> >          echo "$0 selectbsp"
> > @@ -422,15 +421,13 @@ case "$1" in
> >          fi
> >          ;;
> >      "buildall")
> > -        if [ "$2" = "help" ] || [ "$2" = "" ]; then
> > +        if [ "$1" = "help" ]; then
> Hier müsste man meiner Meinung nach immernoch auf $2 prüfen, da in $1 ja
> "buildall" drin steht. Somit wird die Hilfe nie wieder angezeigt.
Korrekt.

Ich habs gefixt und du hast mir gerade mündlich dein Reviewed-by
gegeben.

Tim

> 
> Grüße Jan
> >              echo "This option builds the firmware for all routers of a given community."
> >              echo
> > -            echo "Usage: $0 $1 <community-file> [fast]"
> > -            echo "available community-files: "
> > -            /bin/ls community/*.cfg
> > +            echo "Usage: $0 $1 [fast]"
> >              echo
> >          else
> > -            buildall "$2" "$3"
> > +            buildall "$2"
> >          fi
> >          ;;
> >      "release")
> > @@ -453,7 +450,7 @@ case "$1" in
> >          echo "  prepare"
> >          echo "  config openwrt"
> >          echo "  build [fast|debug]"
> > -        echo "  buildall <community-file> [fast]"
> > +        echo "  buildall [fast]"
> >          echo "  release [all] [fast]"
> >          echo "  clean"
> >          echo ""
> > -- 
> > 2.1.4
> > 
> 
> -- 
> franken-dev mailing list
> franken-dev@freifunk.net
> http://lists.freifunk.net/mailman/listinfo/franken-dev-freifunk.net
Tim Niemeyer May 15, 2016, 3:02 p.m.
Applied.

Tim

Am Samstag, den 14.05.2016, 16:36 +0200 schrieb Tim Niemeyer:
> Signed-off-by: Tim Niemeyer <tim@tn-x.org>
> ---
> 
>  buildscript | 15 ++++++---------
>  1 file changed, 6 insertions(+), 9 deletions(-)
> 
> diff --git a/buildscript b/buildscript
> index 7e16687..d6e4d51 100755
> --- a/buildscript
> +++ b/buildscript
> @@ -316,14 +316,13 @@ clean() {
>  
>  buildall() {
>      for bsp in $(/bin/ls bsp/*.bsp); do
> -        ./buildscript selectcommunity "$1"
>          ./buildscript selectbsp "$bsp"
>          ./buildscript prepare
> -        ./buildscript build "$2"
> +        ./buildscript build "$1"
>      done
>  }
>  
> -if [ "$1" != "selectbsp" -a "$1" != "selectcommunity" -a "$1" != "buildall" ]; then
> +if [ "$1" != "selectbsp" -a "$1" != "selectcommunity" ]; then
>      if [ ! -h selected_bsp ]; then
>          echo "Please select a Board-Support-Package using:"
>          echo "$0 selectbsp"
> @@ -422,15 +421,13 @@ case "$1" in
>          fi
>          ;;
>      "buildall")
> -        if [ "$2" = "help" ] || [ "$2" = "" ]; then
> +        if [ "$1" = "help" ]; then
>              echo "This option builds the firmware for all routers of a given community."
>              echo
> -            echo "Usage: $0 $1 <community-file> [fast]"
> -            echo "available community-files: "
> -            /bin/ls community/*.cfg
> +            echo "Usage: $0 $1 [fast]"
>              echo
>          else
> -            buildall "$2" "$3"
> +            buildall "$2"
>          fi
>          ;;
>      "release")
> @@ -453,7 +450,7 @@ case "$1" in
>          echo "  prepare"
>          echo "  config openwrt"
>          echo "  build [fast|debug]"
> -        echo "  buildall <community-file> [fast]"
> +        echo "  buildall [fast]"
>          echo "  release [all] [fast]"
>          echo "  clean"
>          echo ""
> -- 
> 2.1.4
>