diff --git a/main.go b/main.go index cc447a9..214b7cb 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,8 @@ package main -import "meow.tf/deb-simple" +import ( + "gitea.meow.tf/tyler/deb-simple" +) func main() { simple.Start() diff --git a/src/meow.tf/deb-simple/apt.go b/src/gitea.meow.tf/tyler/deb-simple/apt.go similarity index 98% rename from src/meow.tf/deb-simple/apt.go rename to src/gitea.meow.tf/tyler/deb-simple/apt.go index 4653b3d..fed999d 100644 --- a/src/meow.tf/deb-simple/apt.go +++ b/src/gitea.meow.tf/tyler/deb-simple/apt.go @@ -12,7 +12,7 @@ import ( "encoding/hex" "golang.org/x/crypto/openpgp" "time" - "meow.tf/deb-simple/deb/release" + "gitea.meow.tf/deb-simple/deb/release" "path" ) diff --git a/src/meow.tf/deb-simple/config.go b/src/gitea.meow.tf/tyler/deb-simple/config.go similarity index 97% rename from src/meow.tf/deb-simple/config.go rename to src/gitea.meow.tf/tyler/deb-simple/config.go index f64828e..345c5f1 100644 --- a/src/meow.tf/deb-simple/config.go +++ b/src/gitea.meow.tf/tyler/deb-simple/config.go @@ -17,6 +17,7 @@ type HttpConf struct { SSL bool `ini:"ssl"` SSLCert string `ini:"cert"` SSLKey string `ini:"key"` + EnableVhosts bool `ini:"vhosts"` } type RepoConf struct { diff --git a/src/meow.tf/deb-simple/deb/archive/archive.go b/src/gitea.meow.tf/tyler/deb-simple/deb/archive/archive.go similarity index 100% rename from src/meow.tf/deb-simple/deb/archive/archive.go rename to src/gitea.meow.tf/tyler/deb-simple/deb/archive/archive.go diff --git a/src/meow.tf/deb-simple/deb/release/release.go b/src/gitea.meow.tf/tyler/deb-simple/deb/release/release.go similarity index 100% rename from src/meow.tf/deb-simple/deb/release/release.go rename to src/gitea.meow.tf/tyler/deb-simple/deb/release/release.go diff --git a/src/meow.tf/deb-simple/deb/release/release_file.go b/src/gitea.meow.tf/tyler/deb-simple/deb/release/release_file.go similarity index 100% rename from src/meow.tf/deb-simple/deb/release/release_file.go rename to src/gitea.meow.tf/tyler/deb-simple/deb/release/release_file.go diff --git a/src/meow.tf/deb-simple/deb/release/release_test.go b/src/gitea.meow.tf/tyler/deb-simple/deb/release/release_test.go similarity index 100% rename from src/meow.tf/deb-simple/deb/release/release_test.go rename to src/gitea.meow.tf/tyler/deb-simple/deb/release/release_test.go diff --git a/src/meow.tf/deb-simple/deb/release/writer.go b/src/gitea.meow.tf/tyler/deb-simple/deb/release/writer.go similarity index 100% rename from src/meow.tf/deb-simple/deb/release/writer.go rename to src/gitea.meow.tf/tyler/deb-simple/deb/release/writer.go diff --git a/src/meow.tf/deb-simple/glide.lock b/src/gitea.meow.tf/tyler/deb-simple/glide.lock similarity index 100% rename from src/meow.tf/deb-simple/glide.lock rename to src/gitea.meow.tf/tyler/deb-simple/glide.lock diff --git a/src/meow.tf/deb-simple/glide.yaml b/src/gitea.meow.tf/tyler/deb-simple/glide.yaml similarity index 100% rename from src/meow.tf/deb-simple/glide.yaml rename to src/gitea.meow.tf/tyler/deb-simple/glide.yaml diff --git a/src/meow.tf/deb-simple/http.go b/src/gitea.meow.tf/tyler/deb-simple/http.go similarity index 98% rename from src/meow.tf/deb-simple/http.go rename to src/gitea.meow.tf/tyler/deb-simple/http.go index 9f4ba53..a99b1eb 100644 --- a/src/meow.tf/deb-simple/http.go +++ b/src/gitea.meow.tf/tyler/deb-simple/http.go @@ -197,7 +197,9 @@ func uploadHandler(w http.ResponseWriter, r *http.Request) { // Archive old file log.Println("Replacing", p.Name, "with", f.Name) - if err := os.Remove(path.Join(conf.Repo.Root, p.Path)); err != nil { + oldPath := path.Join(conf.Repo.Root, p.Path) + + if err := os.Remove(oldPath); err != nil && !os.IsNotExist(err) { httpErrorf(w, "Unable to remove old package: %s", err) continue } diff --git a/src/meow.tf/deb-simple/packages.go b/src/gitea.meow.tf/tyler/deb-simple/packages.go similarity index 99% rename from src/meow.tf/deb-simple/packages.go rename to src/gitea.meow.tf/tyler/deb-simple/packages.go index 5095e18..6cc68ec 100644 --- a/src/meow.tf/deb-simple/packages.go +++ b/src/gitea.meow.tf/tyler/deb-simple/packages.go @@ -16,7 +16,7 @@ import ( "crypto/sha256" "github.com/blang/semver" "encoding/json" - "meow.tf/deb-simple/deb/archive" + "gitea.meow.tf/deb-simple/deb/archive" "path" ) diff --git a/src/meow.tf/deb-simple/server.go b/src/gitea.meow.tf/tyler/deb-simple/server.go similarity index 100% rename from src/meow.tf/deb-simple/server.go rename to src/gitea.meow.tf/tyler/deb-simple/server.go