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>
This commit is contained in:
		| @@ -6,7 +6,7 @@ | |||||||
| # use default for platform_do_upgrade() | # use default for platform_do_upgrade() | ||||||
|  |  | ||||||
| platform_check_image() { | 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 hardware="$(board_name)" | ||||||
| 	local magic="$(get_magic_word "$1")" | 	local magic="$(get_magic_word "$1")" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Rafał Miłecki
					Rafał Miłecki