diff options
| author | Jeff Carr <[email protected]> | 2025-10-14 06:18:38 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-14 06:33:14 -0500 |
| commit | 37e10c58d67cb1abb15c2f345f4e6800ab7065b2 (patch) | |
| tree | e5676c7c5bc20c09dce2c31a72fc01174175da02 /main.go | |
| parent | a7d9ba18a64d53010c08285c14804c07b4e8c8fb (diff) | |
hammering it into form
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -6,6 +6,7 @@ import ( "os" "path/filepath" + "go.wit.com/lib/config" "go.wit.com/lib/gui/prep" "go.wit.com/lib/gui/shell" "go.wit.com/lib/protobuf/zoopb" @@ -28,10 +29,11 @@ func main() { // read in protobuf file me.pb = zoopb.NewPackages() - me.pb.Filename = "/home/mirrors/wit/mirrors.wit.com.pb" + me.pb.Filename = config.GetPanic("mirrors.pb") if err := me.pb.Load(); err != nil { if argv.Create { - me.pb.BaseDir = "/home/mirrors/wit" + // me.pb.BaseDir = "/home/mirrors/wit" + me.pb.BaseDir = config.GetPanic("BaseDir") me.pb.Save() me.sh.GoodExit("created new pb file: " + me.pb.Filename) } else { @@ -40,7 +42,7 @@ func main() { } if me.pb.BaseDir == "" { - me.pb.BaseDir = "/home/mirrors/wit" + me.pb.BaseDir = config.GetPanic("BaseDir") me.pb.Save() me.sh.BadExit("pb.BaseDir is bank", nil) } @@ -106,16 +108,13 @@ func main() { } if argv.Everything != nil { - s, err = doWalk() - if err != nil { - me.sh.BadExit(s, err) - } + // move files to the right place s, err = doIncoming(me.pb) if err != nil { me.sh.BadExit(s, err) } - // a second time, files from incoming should have - // been moved now + + // add the filenames to the .pb s, err = doWalk() if err != nil { me.sh.BadExit(s, err) |
