diff --git a/recipes-core/sw-update/sw-update/sw-update.sh b/recipes-core/sw-update/sw-update/sw-update.sh index 50ea4d7..2dd7802 100755 --- a/recipes-core/sw-update/sw-update/sw-update.sh +++ b/recipes-core/sw-update/sw-update/sw-update.sh @@ -276,6 +276,12 @@ update_spl() log INFO "spl update succeed!" } +usage() +{ + echo "Usage: $0 [ -l .tar.gz ] [ -u .img ] [ -s .img ] [ -h ]" + exit 2 +} + ############################ Start of script ################################### if [ ! -b $PLATFORM_MAIN_STORAGE ]; then @@ -295,7 +301,11 @@ while getopts ":l:u:s:h" opt; do update_spl $OPTARG ;; h) - echo "Invalid option: -$OPTARG" >&2 + usage + ;; + ?) + log INFO "Invalid option: -$OPTARG" + usage ;; esac done