Message ID | 1458512292-14687-4-git-send-email-mayosemmel@gmail.com |
---|---|
State | Superseded, archived |
Headers | show |
diff --git a/buildscript b/buildscript index cf7ff60..590183a 100755 --- a/buildscript +++ b/buildscript @@ -233,7 +233,7 @@ build() { mkdir bin fi - postbuild + cp_firmware } config() { @@ -282,8 +282,25 @@ cp_firmware() { done } -postbuild() { - cp_firmware +buildrelease() { + if [ "$1" = "all" ];then + buildall + elif [ "$1" = "fast" ];then + build fast + elif [ "$1" = "all" ] && [ "$2" = "fast" ];then + buildall fast + else + build + fi + rm -f "./bin/MD5SUMS" + rm -f "./bin/SHA1SUMS" + cd bin + for binary in $(ls *.bin); do + md5sum "$binary" >> ./MD5SUMS + sha1sum "$binary" >> ./SHA1SUMS + done + cd .. + echo -e "VERSION:$version" > ./bin/release.nfo } clean() { @@ -423,6 +440,16 @@ case "$1" in buildall "$2" "$3" fi ;; + "release") + if [ "$2" = help ]; then + echo "This option builds the firmware of a given board. It also creates Checksums and a release.nfo" + echo + echo "Usage: $0 $1 [all] [fast]" + echo + else + buildrelease "$2" + fi + ;; *) echo "This is the Build Environment Script of the Freifunk Community Franken." echo @@ -434,6 +461,7 @@ case "$1" in echo " config openwrt" echo " build [fast|debug]" echo " buildall <community-file> [fast]" + echo " release [all] [fast]" echo " clean" echo "" echo "If you need help to one of these options just type: $0 <command> help"
On Sun, 20 Mar 2016 23:18:12 +0100 Jan Kraus <mayosemmel@googlemail.com> wrote: Hi Jan, sorry, ich habe noch Anmerkungen, den Patch habe ich bisher noch gar nicht angeschaut gehabt, Asche auf mein Haupt. > Signed-off-by: Jan Kraus <mayosemmel@gmail.com> > --- > buildscript | 34 +++++++++++++++++++++++++++++++--- > 1 file changed, 31 insertions(+), 3 deletions(-) > > diff --git a/buildscript b/buildscript > index cf7ff60..590183a 100755 > --- a/buildscript > +++ b/buildscript > @@ -233,7 +233,7 @@ build() { > mkdir bin > fi > > - postbuild > + cp_firmware > } > > config() { > @@ -282,8 +282,25 @@ cp_firmware() { > done > } > > -postbuild() { > - cp_firmware > +buildrelease() { > + if [ "$1" = "all" ];then > + buildall > + elif [ "$1" = "fast" ];then > + build fast > + elif [ "$1" = "all" ] && [ "$2" = "fast" ];then > + buildall fast > + else > + build > + fi > + rm -f "./bin/MD5SUMS" > + rm -f "./bin/SHA1SUMS" > + cd bin > + for binary in $(ls *.bin); do > + md5sum "$binary" >> ./MD5SUMS > + sha1sum "$binary" >> ./SHA1SUMS > + done Hier werden wieder Tabs und Spaces gemischt. Des weiteren laesst sich 'for binary in $(ls *.bin); do' einfach als 'for binary in *.bin; do' ausdruecken. Md5 und auch Sha1 wuerde ich heute nicht mehr einsetzen und empfehle daher Sha256. > + cd .. > + echo -e "VERSION:$version" > ./bin/release.nfo > } > > clean() { > @@ -423,6 +440,16 @@ case "$1" in > buildall "$2" "$3" > fi > ;; > + "release") > + if [ "$2" = help ]; then > + echo "This option builds the firmware of a given board. It also creates Checksums and a release.nfo" > + echo firmware _for_ a given board, klingt gefuehlt besser :) It also creates _hash sums_ and _the file_ release.nfo. > + echo "Usage: $0 $1 [all] [fast]" > + echo > + else > + buildrelease "$2" > + fi > + ;; > *) > echo "This is the Build Environment Script of the Freifunk Community Franken." > echo > @@ -434,6 +461,7 @@ case "$1" in > echo " config openwrt" > echo " build [fast|debug]" > echo " buildall <community-file> [fast]" > + echo " release [all] [fast]" > echo " clean" > echo "" > echo "If you need help to one of these options just type: $0 <command> help" > -- > 2.1.4 Gruss -Steffen
Signed-off-by: Jan Kraus <mayosemmel@gmail.com> --- buildscript | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-)