remove help commands (user should read docs)

i always say, code should never document itself.

that's what documentation is for. the releases
contain documentation under docs/ but the git
repository does not; for that, use the website.

(in practise, cbmk usually needs internet anyway)

Signed-off-by: Leah Rowe <leah@libreboot.org>
audit2-merge1
Leah Rowe 2024-05-15 04:30:42 +01:00 committed by Leah Rowe
parent 23854de888
commit e71189420f
2 changed files with 4 additions and 76 deletions

29
build
View File

@ -23,7 +23,7 @@ linkname="${linkpath##*/}"
main()
{
x_ id -u 1>/dev/null 2>/dev/null
[ $# -lt 1 ] && $err "Too few arguments. Try: ${0} help"
[ $# -lt 1 ] && $err "Check $projectname documentation for help."
[ "$1" = "dependencies" ] && x_ install_packages $@ && cbmk_exit 0
@ -45,8 +45,6 @@ initcmd()
[ "$(id -u)" != "0" ] || $err "this command as root is not permitted"
case "${1}" in
help) usage ${0} ;;
list) items "script" ;;
version) printf "%s\n" "$relname" ;;
release) shift 1; mkrelease $@ ;;
*)
@ -93,33 +91,10 @@ git_init()
excmd()
{
[ -f "${script_path}" ] || $err "Bad command. Run: ${linkpath} help"
[ -f "${script_path}" ] || $err "Bad command. Check $projectname docs."
shift 1; "$script_path" $@ || $err "excmd: ${script_path} ${@}"
}
usage()
{
progname=${0}
cat <<- EOF
$relname
USAGE: ${progname} <OPTION>
possible values for 'OPTION':
$(items "script")
Special commands (consult $projectname documentation):
./update release
./build dependencies distroname
(replace distroname with a filename from config/dependencies/)
To know what ${projectname} version you're on, type:
${progname} version
Refer to ${projectname} documentation for more info.
EOF
}
mkrelease()
{
export CBMK_RELEASE="y"

View File

@ -10,7 +10,6 @@ set -u -e
. "include/option.sh"
serprog_usage="usage: ./build roms serprog <rp2040|stm32> [board]"
seavgabiosrom="elf/seabios/default/libgfxinit/vgabios.bin"
grub_background="background1280x800.png"
grubelf="elf/grub/grub.elf"
@ -33,9 +32,6 @@ main()
{
while [ $# -gt 0 ]; do
case ${1} in
help)
usage
exit 0 ;;
list)
x_ items config/coreboot
return 0 ;;
@ -79,8 +75,8 @@ main()
handle_serprog()
{
[ -z "${1+x}" ] && $err "${serprog_usage}"
[ "$1" != "rp2040" ] && [ "$1" != "stm32" ] && $err "$serprog_usage"
[ -z "${1+x}" ] && $err "bad command. Check $projectname docs."
[ "$1" != "rp2040" ] && [ "$1" != "stm32" ] && $err "bad command"
if [ "${1}" = "rp2040" ]; then
serprog_boards_dir=${pico_sdk_dir}/src/boards/include/boards
[ -d "$pico_src_dir" ] || x_ ./update trees -f "pico-serprog"
@ -472,47 +468,4 @@ moverom()
x_ cp "$1" "$2"
}
usage()
{
cat <<- EOF
USAGE: ./build roms targetname
To build *all* boards, do this: ./build roms all
To list *all* boards, do this: ./build roms list
Optional Flags:
-d: displaymode
-p: payload
-k: keyboard layout
Example commands:
./build roms x60
./build roms x200_8mb x60
./build roms x60 -p grub -d corebootfb -k usqwerty
to see possible values for 'target':
./build roms list
Can also build serprog images:
${serprog_usage}
to see targets of only a given status (stable, unstable,
broken, untested and unknown), try e.g.
./build roms list stable
./build roms list unstable untested
./build roms list unknown
./build roms list broken
./build roms list broken stable
the value is set in target.cfg for each board. if status
is unitialised, it defaults to "unknown". only stable/unstable
targets are permitted in releases; broken, untested and
unknown are not allowed, but are accessible via normal building
Refer to the ${projectname} documentation for more information.
EOF
}
main $@