Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix a couple bugs #1

Merged
merged 4 commits into from

4 participants

@darkhelmet
  • Don't copy into, copy over. It was copying github.com/foo/bar into github.com/foo/bar/bar
  • Remove all the source directories, not just git
@cespare

+1 for these changes.

@victorcoder

+1 for this too

@kr kr merged commit 7fd0a60 into from
@kr
Owner
kr commented

Excellent stuff. Thanks! (Sorry it took me so long to get to this!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 4 deletions.
  1. +7 −4 main.go
View
11 main.go
@@ -59,14 +59,17 @@ func main() {
log.Fatal(err)
}
- err = run("cp", "-r", pkgdir, imp)
+ err = run("cp", "-r", pkgdir+"/", imp)
if err != nil {
log.Fatal(err)
}
- err = os.RemoveAll(imp + "/.git")
- if err != nil {
- log.Fatal(err)
+ scmdirs := []string{"/.git", "/.hg", "/.bzr"}
+ for _, scmdir := range scmdirs {
+ err = os.RemoveAll(imp + scmdir)
+ if err != nil {
+ log.Fatal(err)
+ }
}
}
Something went wrong with that request. Please try again.