diff options
author | Johan Sørensen <johan@johansorensen.com> | 2008-04-19 01:01:08 +0200 |
---|---|---|
committer | Johan Sørensen <johan@johansorensen.com> | 2008-04-19 01:01:08 +0200 |
commit | c5070c6a6ea3d148047fc6bc4b4ce1ce6fad43c0 (patch) | |
tree | 14194baa0e235769469fec9fd3b6effbe6070450 /script/git-daemon | |
parent | 37e1c41b4f693c787096e3fb7858f8b8c68c966b (diff) | |
download | gitorious-mainline-outdated-c5070c6a6ea3d148047fc6bc4b4ce1ce6fad43c0.zip gitorious-mainline-outdated-c5070c6a6ea3d148047fc6bc4b4ce1ce6fad43c0.tar.gz gitorious-mainline-outdated-c5070c6a6ea3d148047fc6bc4b4ce1ce6fad43c0.tar.bz2 |
Fixed git-daemon optparsing
Diffstat (limited to 'script/git-daemon')
-rwxr-xr-x | script/git-daemon | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/script/git-daemon b/script/git-daemon index 0064342..c0e7d4f 100755 --- a/script/git-daemon +++ b/script/git-daemon @@ -171,28 +171,33 @@ options = { } OptionParser.new do |opts| - opts.banner = "Usage: #{$0} start|stop [options]" + opts.banner = "Usage: #{$0} [options]" - opts.on("-p", "--port", Integer, "Port to listen on") do |o| + opts.on("-p", "--port=[port]", Integer, "Port to listen on", "Default: #{options[:port]}") do |o| options[:port] = o end - opts.on("-h", "--host", "Host to listen on") do |o| + opts.on("-a", "--address=[host]", "Host to listen on", "Default: #{options[:host]}") do |o| options[:host] = o end - opts.on("-l", "--logfile", "File to log to") do |o| + opts.on("-l", "--logfile=[file]", "File to log to", "Default: #{options[:logfile]}") do |o| options[:logfile] = o end - opts.on("-l", "--logfile", "PID file to use (if daemonized)") do |o| + opts.on("-P", "--pidfile=[file]", "PID file to use (if daemonized)", "Default: #{options[:pidfile]}") do |o| options[:pidfile] = o end - opts.on("-d", "--daemonize", "Daemonize or run in foreground (default)") do |o| + opts.on("-d", "--daemonize", "Daemonize or run in foreground", "Default: #{options[:daemonize]}") do |o| options[:daemonize] = o end + opts.on_tail("-h", "--help", "Show this help message.") do + puts opts + exit + end + # opts.on("-e", "--environment", "RAILS_ENV to use") do |o| # options[:port] = o # end |