orion: sysupgrade: change platform_check_image() args validation

sysupgrade passes image to check as argument so use $# instead of $ARGC.
It also fits this function better as it checks $1 and not $ARGV.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
master
Rafał Miłecki 2019-07-14 22:11:40 +02:00
parent 670ce65a44
commit bf4eef46b4
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@
# use default for platform_do_upgrade()
platform_check_image() {
[ "${ARGC}" -gt 1 ] && { echo 'Too many arguments. Only flash file expected.'; return 1; }
[ "$#" -gt 1 ] && { echo 'Too many arguments. Only flash file expected.'; return 1; }
local hardware="$(board_name)"
local magic="$(get_magic_word "$1")"