[brick] support verbose and watch together
@@ -97,15 +97,17 @@ func main() {
// set user-defined log level
if len(os.Args) > 2 {
- if os.Args[2] == "-v" {
+ for i := 2; i < len(os.Args); i++ {
+ if os.Args[i] == "-v" {
exec.EnableVerbose()
- } else if os.Args[2] == "-w" {
+ } else if os.Args[i] == "-w" {
exec.EnableWatch()
} else {
fmt.Println("Invalid Parameter. Usage: brick filename [-v|-w]\n\t-v\tverbose mode\n\t-w\twatch mode")
os.Exit(1)
}
}
+ }
exec.Execute(cmd, args)
}
