mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-17 18:34:57 +02:00
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?
This commit is contained in:
@@ -30,19 +30,6 @@ cbrevision=""
|
|||||||
cbcfgsdir="resources/coreboot"
|
cbcfgsdir="resources/coreboot"
|
||||||
|
|
||||||
main()
|
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
|
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 $@
|
main $@
|
||||||
|
|||||||
Reference in New Issue
Block a user