summaryrefslogtreecommitdiff
path: root/resources/scripts/download/ich9utils
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-02-16 14:04:16 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-02-16 18:00:31 +0100
commit2bb805e2e07a7d3e1268a09d720ecd13e26af418 (patch)
tree6becf80c66b9e521dd993c4ada976d98ed33a66e /resources/scripts/download/ich9utils
parent4b2d426a206e6182f4e6676b3d6018f05d6e4d98 (diff)
download: Add --help in the individual download scripts
This doesn't change the existing usage of the scripts: - For the Coreboot script, before this change, all arguments that were passed were considered as board to download the Coreboot source code for. Here we added the '--help' and '--list-boards' arguments, so it should not be an issue as it is extremely unlikely that a board would be called '--help' or '--list-boards'. - All the other scripts don't use any arguments so passing --help should not conflict with the existing usage. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'resources/scripts/download/ich9utils')
-rwxr-xr-xresources/scripts/download/ich9utils17
1 files changed, 17 insertions, 0 deletions
diff --git a/resources/scripts/download/ich9utils b/resources/scripts/download/ich9utils
index a00f27dd..d8232b03 100755
--- a/resources/scripts/download/ich9utils
+++ b/resources/scripts/download/ich9utils
@@ -21,6 +21,23 @@
[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u -e
+usage()
+{
+ progname="./download ich9utils"
+ printf "Usage:\n"
+ printf "\t%s # %s\n" \
+ "${progname}" \
+ "Download ich9utils"
+ printf "\t%s --help # %s\n" \
+ "${progname}" \
+ "Prints this help"
+}
+
+if [ $# -ne 0 ] ; then
+ usage
+ exit 0
+fi
+
printf "Downloading ich9utils\n"
if [ -d ich9utils ]; then