shithub: orca

Download patch

ref: 0e8492bb9cd824ba183d6564e63ebc4a94bed919
parent: 3d8b0a8bf67333a527c1728da2b3d57cfc104069
author: cancel <cancel@cancel.fm>
date: Fri Nov 30 12:36:47 EST 2018

Fix bad argument count check

--- a/tool
+++ b/tool
@@ -5,10 +5,11 @@
 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 @@
                   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 @@
     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"