Browse Source

Store index jars in persistent storage

pull/8/head
Daniel Martí 11 years ago
parent
commit
777bbd60b3
  1. 16
      cmd/fdroidcl/update.go

16
cmd/fdroidcl/update.go

@ -15,7 +15,6 @@ import (
"os"
"path/filepath"
"github.com/mvdan/basedir"
"github.com/mvdan/fdroidcl"
)
@ -102,20 +101,7 @@ func downloadEtag(url, path string, sum []byte) error {
}
func indexPath(name string) string {
cache, err := basedir.Cache()
if err != nil {
log.Fatalf("Could not determine cache dir: %v", err)
}
return filepath.Join(appSubdir(cache), repoName+".jar")
}
func appSubdir(dir string, subdir ...string) string {
elems := append([]string{dir, "fdroidcl"}, subdir...)
p := filepath.Join(elems...)
if err := os.MkdirAll(p, 0755); err != nil {
log.Fatalf("Could not create app dir: %v", err)
}
return p
return filepath.Join(mustConfig(), repoName+".jar")
}
func mustLoadIndex() *fdroidcl.Index {

Loading…
Cancel
Save