Browse Source

Fix bad argument count check

master
cancel 6 years ago
parent
commit
0e8492bb9c
  1. 10
      tool

10
tool

@ -5,10 +5,11 @@ print_usage() {
cat <<EOF
Usage: tool [options] command [args]
Commands:
build <target>
build <config> <target>
Compile orca.
Targets: debug, release
Default: debug
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"

Loading…
Cancel
Save