diff options
| -rw-r--r-- | main.go | 14 | ||||
| -rw-r--r-- | resources/NEWUSER | 10 |
2 files changed, 23 insertions, 1 deletions
@@ -7,7 +7,9 @@ package main import ( "embed" + "fmt" + "go.wit.com/lib/fhelp" "go.wit.com/lib/gui/prep" "go.wit.com/lib/gui/shell" "go.wit.com/lib/protobuf/forgepb" @@ -36,7 +38,17 @@ func main() { // the current forge init process me.forge = forgepb.Init() // init forge.pb - me.forge.ScanRepoDir() // looks for new dirs, checks existing repos for changes + + if !shell.Exists(me.forge.Config.ReposPB) { + // very likely new user + pfile, _ := resources.ReadFile("resources/NEWUSER") + log.Info("NEW USER:", string(pfile)) + s := fmt.Sprintf("Initialize forge?") + if !fhelp.QuestionUser(s) { + me.sh.GoodExit("no? porque?") + } + } + me.forge.ScanRepoDir() // looks for new dirs, checks existing repos for changes if me.forge.Config.Mode != forgepb.ForgeMode_NORMAL { me.forge.Config.DumpPB() } diff --git a/resources/NEWUSER b/resources/NEWUSER new file mode 100644 index 0000000..0384af2 --- /dev/null +++ b/resources/NEWUSER @@ -0,0 +1,10 @@ + When building the WIT Private Cloud, a tool was needed + to maintain the +50 git repositories quickly between + all the distributed machines here. + One result of that effort is this tool 'forge'. + + forge can be used to quickly identify changes in + a collection of git repos, looking for missing or + abandoned files, patches and commits in all repositories. + + Maybe it will be useful to you. |
