Fix bad argument count check
@@ -5,10 +5,11 @@ print_usage() {
cat <<EOF
Usage: tool [options] command [args]
Commands:
- build <target>
+ build <config> <target>
Compile orca.
- Targets: debug, release
+ Configs: debug, release
Default: debug
+ Targets: orca, tui
Output: build/<target>/orca
clean
Removes build/
@@ -22,6 +23,7 @@ Options:
You should probably do this if you plan to give the
compiled binary to other people.
-s Print statistics about compile time and binary size.
+ -g or --debug Build with debug configuration (default)
-h or --help Print this message and exit.
EOF
}
@@ -233,7 +235,7 @@ case "$1" in
if [[ "$#" -gt 2 ]]; then
fatal "Too many arguments for 'build'"
fi
- if [ "$#" -lt 1 ]; then
+ if [ "$#" -lt 2 ]; then
fatal "Argument required for build target"
fi
build_target "$2"
