summaryrefslogtreecommitdiff
path: root/resources/scripts
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-03-06 17:46:44 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-03-06 18:02:16 +0100
commit3b80a42aa01dd4a26a400193769bd039da241234 (patch)
tree4e3e612f84a8dc220da1a459cb630b8b60b5a4d5 /resources/scripts
parentfd41399961d81cfda997cb580957650b6ea5e9c3 (diff)
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: 2bb805e2e07a7d3e1268a09d720ecd13e26af418 (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>
Diffstat (limited to 'resources/scripts')
-rwxr-xr-xresources/scripts/download/coreboot8
1 files changed, 6 insertions, 2 deletions
diff --git a/resources/scripts/download/coreboot b/resources/scripts/download/coreboot
index b94b1bc9..21fe0781 100755
--- a/resources/scripts/download/coreboot
+++ b/resources/scripts/download/coreboot
@@ -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