summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-03 00:17:36 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-03 00:17:36 +0100
commit00653aab1ea6d1bc227227da9e2195432f8fe52e (patch)
treec5af83eab50fdc1186597b2b8f3974c4f6dd456b /script
parentafac9a06d2c6f18c44066321674129383e85b2ba (diff)
better help text on invalid commands
adding help again is a bad idea. code should never document itself; that's what documentation is for. so, make the code do a better job telling the user where to find documentation. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script')
-rwxr-xr-xscript/roms2
-rwxr-xr-xscript/trees2
2 files changed, 2 insertions, 2 deletions
diff --git a/script/roms b/script/roms
index 7e5e1be6..ee48bc42 100755
--- a/script/roms
+++ b/script/roms
@@ -69,7 +69,7 @@ main()
handle_serprog()
{
- [ -z "${1+x}" ] && $err "bad command. Check $projectname docs."
+ [ -z "${1+x}" ] && badcmd
[ "$1" != "rp2040" ] && [ "$1" != "stm32" ] && $err "bad command"
if [ "$1" = "rp2040" ]; then
serprog_boards_dir="$picosdk/src/boards/include/boards"
diff --git a/script/trees b/script/trees
index 1075b220..e22467f7 100755
--- a/script/trees
+++ b/script/trees
@@ -27,7 +27,7 @@ main()
-s) mode="savedefconfig" ;;
-l) mode="olddefconfig" ;;
-n) mode="nconfig" ;;
- *) $err "Invalid option" ;;
+ *) badcmd "invalid option '-$option'" ;;
esac
shift; project="${OPTARG#src/}"; shift
done