summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-15 13:42:07 -0500
committerJeff Carr <[email protected]>2025-10-15 13:42:07 -0500
commitfec0e3a5636179fcd71fbf2e004e164c753c9725 (patch)
treecf3d28163a3de0a54e31295dfd46678c27a84282
parent69c22a94c6c34bdc450cf0a9d29505ed44fd01b7 (diff)
new user note
-rw-r--r--main.go14
-rw-r--r--resources/NEWUSER10
2 files changed, 23 insertions, 1 deletions
diff --git a/main.go b/main.go
index e5b3e83..274a550 100644
--- a/main.go
+++ b/main.go
@@ -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.