From 5a544a2f626c02bfc802003ee12bb6c06c81701b Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 4 Jun 2017 17:36:33 +0300 Subject: [PATCH] build.sh tweaks --- build.sh | 5 +++-- writeimage.sh | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index 46e7f189c1..dac91efc6d 100755 --- a/build.sh +++ b/build.sh @@ -48,10 +48,11 @@ elif [ "$target" == "mkrelease" ]; then mv $basedir/$osname-$board.img $basedir/$osname-$board-$osversion.img rm -f $basedir/$osname-$board-$osversion.img.gz $gzip $basedir/$osname-$board-$osversion.img + echo "your image is ready at $basedir/$osname-$board-$osversion.img.gz" elif [ -n "$target" ]; then make O=$outputdir $target else - make O=$outputdir - test -x $boarddir/mkimage.sh && $boarddir/mkimage.sh + make O=$outputdir all + echo "build successful" fi diff --git a/writeimage.sh b/writeimage.sh index 3e0f943064..99895df526 100755 --- a/writeimage.sh +++ b/writeimage.sh @@ -2,7 +2,7 @@ function usage() { - echo "Usage: $0 [options...]" 1>&2 + echo "Usage: $0 [options...]" echo "" echo "Available options:" echo " <-i image_file> - indicates the path to the image file (e.g. -i /home/user/Download/file.img.gz)" @@ -14,7 +14,7 @@ function usage() { } if [ -z "$1" ]; then - usage + usage 1>&2 fi if [[ $(id -u) -ne 0 ]]; then echo "please run as root"; exit 1; fi @@ -51,13 +51,13 @@ while getopts "a:d:f:h:i:lm:n:o:p:s:w" o; do DNS=${S_IP[2]} ;; *) - usage + usage 1>&2 ;; esac done if [ -z "$SDCARD_DEV" ] || [ -z "$DISK_IMG" ]; then - usage + usage 1>&2 fi function cleanup {