summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go21
1 files changed, 19 insertions, 2 deletions
diff --git a/main.go b/main.go
index ce49aa6..d1eb8fc 100644
--- a/main.go
+++ b/main.go
@@ -6,8 +6,10 @@ import (
"path/filepath"
"time"
+ "go.wit.com/lib/debian"
"go.wit.com/lib/gui/prep"
"go.wit.com/lib/protobuf/gitpb"
+ "go.wit.com/lib/protobuf/zoopb"
"go.wit.com/log"
)
@@ -27,7 +29,7 @@ func main() {
wd, err := os.Getwd()
if err != nil {
- badExit(err)
+ me.sh.BadExit("your current directory does not exist err=", err)
}
if argv.Arch == "" {
@@ -37,9 +39,24 @@ func main() {
me.repo, err = gitpb.NewRepo(wd)
if err != nil {
- badExit(err)
+ me.sh.BadExit("is this really a .git directory? err=", err)
}
+ data, err := os.ReadFile("control")
+ if err != nil {
+ me.sh.BadExit("you don't have a 'control' file", err)
+ }
+
+ log.Info("INITIAL PARSE:")
+ log.Info(string(data))
+ dpkgPB := new(zoopb.Package)
+ debian.ParseDpkgOutputIntoPB(dpkgPB, string(data))
+ log.Info("INITIAL PARSE RESULT:")
+ controlfile := debian.MakeControlFile(dpkgPB)
+ log.Info(controlfile)
+ log.Info("INITIAL PARSE END")
+ me.sh.GoodExit("rewriting this app")
+
// build()
if argv.Show != nil {
log.Info("todo: show", me.repo.Namespace)