download/coreboot: remove unnecessary bloat
it is not necessary to have help output similarly, listing all boards in this script is pointless. why not just run ls -1 on the directory?fsdg20230625
parent
d1935c0590
commit
c616930b71
|
@ -30,19 +30,6 @@ cbrevision=""
|
|||
cbcfgsdir="resources/coreboot"
|
||||
|
||||
main()
|
||||
{
|
||||
if [ $# -eq 1 ] && [ "$1" = "--help" ] ; then
|
||||
usage
|
||||
exit 0
|
||||
elif [ $# -eq 1 ] && [ "$1" = "--list-boards" ] ; then
|
||||
list_supported_boards
|
||||
exit 0
|
||||
fi
|
||||
|
||||
fetch_coreboot_trees $@
|
||||
}
|
||||
|
||||
fetch_coreboot_trees()
|
||||
{
|
||||
rm -f ${cbcfgsdir}/*/seen
|
||||
|
||||
|
@ -186,23 +173,4 @@ prepare_new_coreboot_tree()
|
|||
)
|
||||
}
|
||||
|
||||
usage()
|
||||
{
|
||||
progname="./download coreboot"
|
||||
printf "Usage:\n"
|
||||
printf "\t%s\t\t\t# Clone coreboot for all boards\n" "${progname}"
|
||||
printf "\t%s [board [board] ...] # Clone coreboot for given boards\n" \
|
||||
${progname}
|
||||
printf "\t%s --list-boards\t# Prints this help\n" ${progname}
|
||||
printf "\t%s --help\t\t# List supported boards\n" ${progname}
|
||||
printf "\t%s --help\t\t# Prints this help\n" ${progname}
|
||||
}
|
||||
|
||||
list_supported_boards()
|
||||
{
|
||||
for _board in "${cbcfgsdir}/"*; do
|
||||
echo ${_board} | sed 's#${cbcfgsdir}/##'
|
||||
done
|
||||
}
|
||||
|
||||
main $@
|
||||
|
|
Loading…
Reference in New Issue