19 flag.StringVar(&theConfig.Addr, "address", "0.0.0.0:80",
20 "Address to listen on, \"host:port\".")
21 flag.StringVar(&theConfig.GitCommand, "git-command", "/usr/bin/git",
22 "Path to git or gitolite-shell executable. Each authenticated request will execute this program with a single argument, \"http-backend\".")
23 cwd, err := os.Getwd()
25 log.Fatalln("Getwd():", err)
27 flag.StringVar(&theConfig.Root, "repo-root", cwd,
28 "Path to git repositories.")
30 // MakeArvadosClient returns an error if token is unset (even
31 // though we don't need to do anything requiring
32 // authentication yet). We can't do this in newArvadosClient()
33 // just before calling MakeArvadosClient(), though, because
34 // that interferes with the env var needed by "run test
36 os.Setenv("ARVADOS_API_TOKEN", "xxx")
42 if err := srv.Start(); err != nil {
45 log.Println("Listening at", srv.Addr)
46 log.Println("Repository root", theConfig.Root)
47 if err := srv.Wait(); err != nil {