OLD | NEW |
1 // Copyright 2011 The Go Authors. All rights reserved. | 1 // Copyright 2011 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package main | 5 package main |
6 | 6 |
7 import ( | 7 import ( |
8 "bytes" | 8 "bytes" |
9 "flag" | 9 "flag" |
10 "fmt" | 10 "fmt" |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 var logf = log.Printf | 353 var logf = log.Printf |
354 | 354 |
355 func exitIfErrors() { | 355 func exitIfErrors() { |
356 if exitStatus != 0 { | 356 if exitStatus != 0 { |
357 exit() | 357 exit() |
358 } | 358 } |
359 } | 359 } |
360 | 360 |
361 func run(cmdargs ...interface{}) { | 361 func run(cmdargs ...interface{}) { |
362 cmdline := stringList(cmdargs...) | 362 cmdline := stringList(cmdargs...) |
363 » if buildN || buildV { | 363 » if buildN || buildX { |
364 fmt.Printf("%s\n", strings.Join(cmdline, " ")) | 364 fmt.Printf("%s\n", strings.Join(cmdline, " ")) |
365 if buildN { | 365 if buildN { |
366 return | 366 return |
367 } | 367 } |
368 } | 368 } |
369 | 369 |
370 cmd := exec.Command(cmdline[0], cmdline[1:]...) | 370 cmd := exec.Command(cmdline[0], cmdline[1:]...) |
371 cmd.Stdout = os.Stdout | 371 cmd.Stdout = os.Stdout |
372 cmd.Stderr = os.Stderr | 372 cmd.Stderr = os.Stderr |
373 if err := cmd.Run(); err != nil { | 373 if err := cmd.Run(); err != nil { |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 if t := clash[fold]; t != "" { | 667 if t := clash[fold]; t != "" { |
668 if s > t { | 668 if s > t { |
669 s, t = t, s | 669 s, t = t, s |
670 } | 670 } |
671 return s, t | 671 return s, t |
672 } | 672 } |
673 clash[fold] = s | 673 clash[fold] = s |
674 } | 674 } |
675 return "", "" | 675 return "", "" |
676 } | 676 } |
OLD | NEW |