From 0e8492bb9cd824ba183d6564e63ebc4a94bed919 Mon Sep 17 00:00:00 2001 From: cancel Date: Fri, 30 Nov 2018 17:36:47 +0900 Subject: [PATCH] Fix bad argument count check --- tool | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tool b/tool index f419148..60b1c43 100755 --- a/tool +++ b/tool @@ -5,10 +5,11 @@ print_usage() { cat < + build Compile orca. - Targets: debug, release - Default: debug + Configs: debug, release + Default: debug + Targets: orca, tui Output: build//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"