diff options
-rw-r--r-- | filter.go | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -5,6 +5,7 @@ import ( "io" "io/ioutil" "os" + "path" "os/exec" "strconv" "strings" @@ -38,7 +39,7 @@ func NewFilter(fromRef string, toPfx string) (*Filter, error) { var err error ret := &Filter{ fromRef: fromRef, - toPfx: toPfx, + toPfx: strings.TrimRight(toPfx, "/"), } ret.refs, err = gitRefs() @@ -68,7 +69,10 @@ func (f *Filter) newmark() int { } func (f *Filter) infofile(name string) string { - return "info/svn2git2aur/" + name + id := strings.Replace(strings.Replace(f.toPfx, "^", "^5E", -1), "/", "^2F", -1) + ret := "info/svn2git2aur/" + id + "/" + name + _ = os.MkdirAll(path.Dir(ret), 0777) + return ret } func (f *Filter) pkgbuild2srcinfo(pkgbuildId string) (string, error) { |