decentral1se
3 years ago
No known key found for this signature in database
GPG Key ID: 3789458B3D0C410
2 changed files with
25 additions and
4 deletions
-
.gitignore
-
distribusi.go
|
|
@ -1,3 +1,4 @@ |
|
|
|
*.css |
|
|
|
dist/ |
|
|
|
distribusi |
|
|
|
test |
|
|
|
|
|
@ -216,12 +216,32 @@ Example: |
|
|
|
|
|
|
|
logrus.Debugf("selecting %s as distribusi root", root) |
|
|
|
|
|
|
|
if err := distribusify(c, root, ignore); err != nil { |
|
|
|
logrus.Fatal(err) |
|
|
|
} |
|
|
|
ch := make(chan error, 2) |
|
|
|
go func() { |
|
|
|
if err := distribusify(c, root, ignore); err != nil { |
|
|
|
ch <- err |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
ch <- nil |
|
|
|
return |
|
|
|
}() |
|
|
|
|
|
|
|
if c.Bool("serve") { |
|
|
|
if err := serveHTTP(root); err != nil { |
|
|
|
go func() { |
|
|
|
if err := serveHTTP(root); err != nil { |
|
|
|
ch <- err |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
ch <- nil |
|
|
|
return |
|
|
|
}() |
|
|
|
} |
|
|
|
|
|
|
|
for i := 1; i <= 2; i++ { |
|
|
|
err := <-ch |
|
|
|
if err != nil { |
|
|
|
logrus.Fatal(err) |
|
|
|
} |
|
|
|
} |
|
|
|