scripts: download: coreboot: fix ./download all

When running ./download all, we have the following error:
    resources/scripts/download/coreboot: Line 52: $1 is not set.

The ./download all command was broken by the following commit:
2bb805e2e0 (download: Add --help in the
individual download scripts).

Reported-by: madbehaviorus[m] on #libreboot on liberachat
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
This commit is contained in:
Denis 'GNUtoo' Carikli 2022-03-06 17:46:44 +01:00
parent fd41399961
commit 3b80a42aa0
No known key found for this signature in database
GPG Key ID: 5F5DFCC14177E263
1 changed files with 6 additions and 2 deletions

View File

@ -49,10 +49,14 @@ usage()
"Prints this help"
}
if [ $# -eq 1 -a "$1" == "--help" ] ; then
# In this script, set -u is used to check for undefined variables, and
# the test command doesn't do any lazy evaluation, so we can't use
# a syntax like that: [ $# -eq 1 -a "$1" == "--help" ].
if [ $# -eq 1 ] && [ "$1" == "--help" ] ; then
usage
exit 0
elif [ $# -eq 1 -a "$1" == "--list-boards" ] ; then
elif [ $# -eq 1 ] && [ "$1" == "--list-boards" ] ; then
list_supported_boards
exit 0
fi