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>
This commit is contained in:
parent
4b2d426a20
commit
2bb805e2e0
3
download
3
download
|
@ -60,6 +60,9 @@ help() {
|
||||||
coreboot trees by default, but './download coreboot x60' will only download
|
coreboot trees by default, but './download coreboot x60' will only download
|
||||||
the coreboot tree required for the target: x60
|
the coreboot tree required for the target: x60
|
||||||
|
|
||||||
|
Each program download script should also accept the --help paramater to
|
||||||
|
display the usage of the script.
|
||||||
|
|
||||||
Refer to the documentation for more information.
|
Refer to the documentation for more information.
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,42 @@
|
||||||
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
||||||
set -u -e
|
set -u -e
|
||||||
|
|
||||||
|
list_supported_boards()
|
||||||
|
{
|
||||||
|
for board in resources/coreboot/*; do
|
||||||
|
echo $board | sed 's#resources/coreboot/##'
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
progname="./download coreboot"
|
||||||
|
printf "Usage:\n"
|
||||||
|
printf "\t%s # %s\n" \
|
||||||
|
"${progname}" \
|
||||||
|
"Download and deblob Coreboot for all the boards"
|
||||||
|
printf "\t%s [board [board] ...] # %s\n" \
|
||||||
|
"${progname}" \
|
||||||
|
"Download and deblob Coreboot for the given boards"
|
||||||
|
printf "\t%s --list-boards # %s\n" \
|
||||||
|
"${progname}" \
|
||||||
|
"Prints this help"
|
||||||
|
printf "\t%s --help # %s\n" \
|
||||||
|
"${progname}" \
|
||||||
|
"List supported boards"
|
||||||
|
printf "\t%s --help # %s\n" \
|
||||||
|
"${progname}" \
|
||||||
|
"Prints this help"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ $# -eq 1 -a "$1" == "--help" ] ; then
|
||||||
|
usage
|
||||||
|
exit 0
|
||||||
|
elif [ $# -eq 1 -a "$1" == "--list-boards" ] ; then
|
||||||
|
list_supported_boards
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# set this when you want to modify each coreboot tree
|
# set this when you want to modify each coreboot tree
|
||||||
# for example, you want to test custom patches
|
# for example, you want to test custom patches
|
||||||
# NODELETE= ./download coreboot
|
# NODELETE= ./download coreboot
|
||||||
|
|
|
@ -21,6 +21,23 @@
|
||||||
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
||||||
set -u -e
|
set -u -e
|
||||||
|
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
progname="./download flashrom"
|
||||||
|
printf "Usage:\n"
|
||||||
|
printf "\t%s # %s\n" \
|
||||||
|
"${progname}" \
|
||||||
|
"Download flashrom"
|
||||||
|
printf "\t%s --help # %s\n" \
|
||||||
|
"${progname}" \
|
||||||
|
"Prints this help"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ $# -ne 0 ] ; then
|
||||||
|
usage
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Get flashrom at the last previously tested revision
|
# Get flashrom at the last previously tested revision
|
||||||
|
|
||||||
# Remove the old version that may still exist:
|
# Remove the old version that may still exist:
|
||||||
|
|
|
@ -21,6 +21,23 @@
|
||||||
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
||||||
set -u -e
|
set -u -e
|
||||||
|
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
progname="./download grub"
|
||||||
|
printf "Usage:\n"
|
||||||
|
printf "\t%s # %s\n" \
|
||||||
|
"${progname}" \
|
||||||
|
"Download GRUB"
|
||||||
|
printf "\t%s --help # %s\n" \
|
||||||
|
"${progname}" \
|
||||||
|
"Prints this help"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ $# -ne 0 ] ; then
|
||||||
|
usage
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Remove the old version that may still exist
|
# Remove the old version that may still exist
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,23 @@
|
||||||
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
||||||
set -u -e
|
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"
|
printf "Downloading ich9utils\n"
|
||||||
|
|
||||||
if [ -d ich9utils ]; then
|
if [ -d ich9utils ]; then
|
||||||
|
|
|
@ -23,6 +23,23 @@
|
||||||
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
||||||
set -u -e
|
set -u -e
|
||||||
|
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
progname="./download memtest86plus"
|
||||||
|
printf "Usage:\n"
|
||||||
|
printf "\t%s # %s\n" \
|
||||||
|
"${progname}" \
|
||||||
|
"Download MemTest86+"
|
||||||
|
printf "\t%s --help # %s\n" \
|
||||||
|
"${progname}" \
|
||||||
|
"Prints this help"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ $# -ne 0 ] ; then
|
||||||
|
usage
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Get the last version of MemTest86+ used, apply patches, build it.
|
# Get the last version of MemTest86+ used, apply patches, build it.
|
||||||
|
|
||||||
# Remove the old version that may exist
|
# Remove the old version that may exist
|
||||||
|
|
|
@ -19,6 +19,23 @@
|
||||||
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
||||||
set -u -e
|
set -u -e
|
||||||
|
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
progname="./download seabios"
|
||||||
|
printf "Usage:\n"
|
||||||
|
printf "\t%s # %s\n" \
|
||||||
|
"${progname}" \
|
||||||
|
"Download SeaBIOS"
|
||||||
|
printf "\t%s --help # %s\n" \
|
||||||
|
"${progname}" \
|
||||||
|
"Prints this help"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ $# -ne 0 ] ; then
|
||||||
|
usage
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Get SeaBIOS, revert to commit last used and apply patches.
|
# Get SeaBIOS, revert to commit last used and apply patches.
|
||||||
|
|
||||||
# Remove the old version that may still exist
|
# Remove the old version that may still exist
|
||||||
|
|
Loading…
Reference in New Issue