summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/main.go b/main.go
index b9dde90..699f5d8 100644
--- a/main.go
+++ b/main.go
@@ -4,6 +4,7 @@ import (
"embed"
"fmt"
"net/http"
+ "os"
"time"
"go.wit.com/log"
@@ -26,11 +27,21 @@ func main() {
if argv.Hostname != "" {
HOSTNAME = argv.Hostname
}
+ // the default forged dir is /home/forge
+ if os.Getenv("FORGE_GOSRC") == "" {
+ os.Setenv("FORGE_GOSRC", "/home/forge")
+ }
+
+ if argv.Init != nil {
+ doInit()
+ okExit("")
+ }
if argv.List != nil {
- doList()
+ exit(doList())
okExit("")
}
+
// forge = forgepb.Init()
if argv.Pull != nil {
doPull()