devcam: add -openbrowser flag. Don't open the start page on browser by default.

Change-Id: I1dc3804bf192dc5119c7d05758ccbacd0e7740f1
This commit is contained in:
Burcu Dogan 2013-08-25 18:28:54 +02:00
parent d0d5f3a1fa
commit 2de9f8aafd
1 changed files with 6 additions and 1 deletions

View File

@ -52,6 +52,8 @@ type serverCmd struct {
noBuild bool
fullClosure bool
openBrowser bool
// end of flag vars
camliSrcRoot string // the camlistore source tree
@ -79,6 +81,8 @@ func init() {
flags.BoolVar(&cmd.noBuild, "nobuild", false, "Do not rebuild anything.")
flags.BoolVar(&cmd.fullClosure, "fullclosure", false, "Use the ondisk closure library.")
flags.BoolVar(&cmd.openBrowser, "openbrowser", false, "Open the start page on startup.")
return cmd
})
}
@ -356,7 +360,8 @@ func (c *serverCmd) RunCommand(args []string) error {
camliBin := filepath.Join(c.camliSrcRoot, "bin", "camlistored")
cmdArgs := []string{
"-configfile=" + filepath.Join(c.camliSrcRoot, "config", "dev-server-config.json"),
"-listen=" + c.listen}
"-listen=" + c.listen,
"-openbrowser=" + strconv.FormatBool(c.openBrowser)}
cmd := exec.Command(camliBin, cmdArgs...)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr