Browse Source

update

pull/103/head
Unknown 12 years ago
parent
commit
bc40cfb334
  1. 12
      build.go

12
build.go

@ -41,12 +41,14 @@ func runBuild(cmd *Command, args []string) {
for _, v := range paths { for _, v := range paths {
if utils.IsExist(v + "/bin/" + proName) { if utils.IsExist(v + "/bin/" + proName) {
err := os.Remove(wd + "/" + proName) if utils.IsExist(wd + "/" + proName) {
if err != nil { err := os.Remove(wd + "/" + proName)
fmt.Printf("Fail to remove file in current directory: %s.\n", err) if err != nil {
return fmt.Printf("Fail to remove file in current directory: %s.\n", err)
return
}
} }
err = os.Rename(v+"/bin/"+proName, wd+"/"+proName) err := os.Rename(v+"/bin/"+proName, wd+"/"+proName)
if err == nil { if err == nil {
fmt.Printf("Moved file from $GOPATH(%s) to current directory(%s).\n", v, wd) fmt.Printf("Moved file from $GOPATH(%s) to current directory(%s).\n", v, wd)
return return

Loading…
Cancel
Save