mirror of https://github.com/perkeep/perkeep.git
devcam: option to add args to camlistored exec.
Handy catch-all for camlistored args we haven't plummed through to devcam server in the proper manner. Example use: $ devcam server -extraargs=-reindex Change-Id: I4af922e4c95728dc7858fa2db9e60c7efd37a3cb
This commit is contained in:
parent
fe25884b71
commit
bab46f1db5
|
@ -62,6 +62,7 @@ type serverCmd struct {
|
||||||
|
|
||||||
openBrowser bool
|
openBrowser bool
|
||||||
flickrAPIKey string
|
flickrAPIKey string
|
||||||
|
extraArgs string // passed to camlistored
|
||||||
// end of flag vars
|
// end of flag vars
|
||||||
|
|
||||||
listen string // address + port to listen on
|
listen string // address + port to listen on
|
||||||
|
@ -94,6 +95,8 @@ func init() {
|
||||||
|
|
||||||
flags.BoolVar(&cmd.openBrowser, "openbrowser", false, "Open the start page on startup.")
|
flags.BoolVar(&cmd.openBrowser, "openbrowser", false, "Open the start page on startup.")
|
||||||
flags.StringVar(&cmd.flickrAPIKey, "flickrapikey", "", "The key and secret to use with the Flickr importer. Formatted as '<key>:<secret>'.")
|
flags.StringVar(&cmd.flickrAPIKey, "flickrapikey", "", "The key and secret to use with the Flickr importer. Formatted as '<key>:<secret>'.")
|
||||||
|
flags.StringVar(&cmd.extraArgs, "extraargs", "",
|
||||||
|
"List of comma separated options that will be passed to camlistored")
|
||||||
return cmd
|
return cmd
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -377,5 +380,8 @@ func (c *serverCmd) RunCommand(args []string) error {
|
||||||
"-listen=" + c.listen,
|
"-listen=" + c.listen,
|
||||||
"-openbrowser=" + strconv.FormatBool(c.openBrowser),
|
"-openbrowser=" + strconv.FormatBool(c.openBrowser),
|
||||||
}
|
}
|
||||||
|
if c.extraArgs != "" {
|
||||||
|
cmdArgs = append(cmdArgs, strings.Split(c.extraArgs, ",")...)
|
||||||
|
}
|
||||||
return runExec(camliBin, cmdArgs, c.env)
|
return runExec(camliBin, cmdArgs, c.env)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue