support comments
E.g. cat <<EOF | go run tools/fm/fm_bot.go -processLimit 0 -quiet -script - out/fm b=cpu gms ct=8888 w=$WHERE/8888 legacy=true # old and busted b=cpu gms ct=8888 w=$WHERE/srgb # new hotness EOF Change-Id: Ia92ba113ae95478313e1f2cc18b7270ea1aa8a42 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205831 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
parent
4daf637187
commit
1450a47409
@ -83,6 +83,11 @@ func sourcesAndFlags(args []string, gms []string) ([]string, []string, error) {
|
||||
sources := []string{}
|
||||
flags := []string{}
|
||||
for _, arg := range args {
|
||||
// Everything after a # is a comment.
|
||||
if strings.HasPrefix(arg, "#") {
|
||||
break
|
||||
}
|
||||
|
||||
// Treat "gm" or "gms" as a shortcut for all known GMs.
|
||||
if arg == "gm" || arg == "gms" {
|
||||
sources = append(sources, gms...)
|
||||
|
Loading…
Reference in New Issue
Block a user