source: projects/specs/trunk/p/peco/peco-0.3.5_make.patch @ 9983

Revision 9983, 822 bytes checked in by iwaim, 8 years ago (diff)

peco 0.3.5-1

  • build/make.go

    diff --git a/build/make.go b/build/make.go
    index c094249..ac8936b 100644
    a b func main() { 
    5959        case "build": 
    6060                setupDeps() 
    6161                buildBinaries() 
     62        case "build-single": 
     63                setupPecoInGopath() 
     64                buildSingleBinary() 
    6265        default: 
    6366                panic("Unknown action: " + action) 
    6467        } 
    func buildBinaryFor(osname, arch string) { 
    201204        run("mv", file, filepath.Join(getBuildDir(), "artifacts")) 
    202205} 
    203206 
     207func buildSingleBinary() { 
     208        buildDir := getBuildDir() 
     209        var goPath = fmt.Sprintf("%s:%s", buildDir, os.Getenv("GOPATH")) 
     210        os.Setenv("GOPATH", goPath) 
     211 
     212        run("go", "build", "-o", 
     213                filepath.Join("peco", "peco"), 
     214                filepath.Join("cmd", "peco", "peco.go"), 
     215        ) 
     216} 
     217 
    204218func run(name string, args ...string) error { 
    205219        splat := []string{name} 
    206220        splat = append(splat, args...) 
Note: See TracBrowser for help on using the repository browser.