Browse Source

codec: build.sh: make zverbose an array variable

This way, we can detect how much verbosity we want
and some functions (e.g. _analyze_extra) are only run when verbosity is high (>1).
Ugorji Nwoke 6 years ago
parent
commit
30de34f175
1 changed files with 3 additions and 2 deletions
  1. 3 2
      codec/build.sh

+ 3 - 2
codec/build.sh

@@ -235,7 +235,8 @@ _main() {
     if [[ -z "$1" ]]; then _usage; return 1; fi
     local x
     local zforce
-    local zargs
+    local zargs=()
+    local zverbose=()
     local zbenchflags
     # unset zforce
     zargs=()
@@ -245,7 +246,7 @@ _main() {
     do
         case "x$flag" in
             'xf') zforce=1 ;;
-            'xv') zverbose=1 ;;
+            'xv') zverbose+=(1) ;;
             'xl') zargs+=("-gcflags"); zargs+=("-l=4") ;;
             'xn') zargs+=("-gcflags"); zargs+=("-m=2") ;;
             'xd') zargs+=("-race") ;;