Exemple #1
0
func main() {
	flag.Parse()

	c, err := shanhu.LoadConfig(*config)
	ne(err)

	s, err := storage.Make(c)
	ne(err)

	p := fmtutil.NewPrinter(os.Stdout)
	printTree(s.SiteDB, p, "/", *treeHash)
}
Exemple #2
0
func main() {
	flag.Parse()

	c, err := shanhu.LoadConfig(*config)
	ne(err)

	s, err := storage.Make(c)
	ne(err)

	switch {
	case *command == "":
		runShell(s)
	default:
		j, err := makeJob(s)
		ne(err)
		j.Line = *command
		exec(j)
	}
}