From 6f4c9cddba99889bf80da89f0e500f5bc97bd07e Mon Sep 17 00:00:00 2001 From: Tim Niemeyer Date: Sat, 14 May 2016 16:36:28 +0200 Subject: [PATCH] buildscript: buildrelease: fix parameter handling Signed-off-by: Tim Niemeyer Reviewed-by: Jan Kraus --- buildscript | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/buildscript b/buildscript index 9d704e6..4aac971 100755 --- a/buildscript +++ b/buildscript @@ -279,14 +279,23 @@ cp_firmware() { buildrelease() { if [ "$1" = "all" ];then - buildall + all=true elif [ "$1" = "fast" ];then - build fast - elif [ "$1" = "all" ] && [ "$2" = "fast" ];then - buildall fast - else - build + fast=fast fi + + if [ "$2" = "all" ];then + all=true + elif [ "$2" = "fast" ];then + fast=fast + fi + + if [ $all ]; then + buildall $fast + else + build $fast + fi + cd bin for binary in *.bin; do md5sum "$binary" > ./"$binary".md5 @@ -458,7 +467,7 @@ case "$1" in echo "Usage: $0 $1 [all] [fast]" echo else - buildrelease "$2" + buildrelease "$2" "$3" fi ;; *)