summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--filter.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/filter.go b/filter.go
index 1ff34ac..7312c73 100644
--- a/filter.go
+++ b/filter.go
@@ -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) {