@@ -68,12 +68,14 end | |||||
68 | optparse = OptionParser.new do |opts| |
|
68 | optparse = OptionParser.new do |opts| | |
69 | opts.banner = "Usage: reposman.rb [OPTIONS...] -s [DIR] -r [HOST] -k [KEY]" |
|
69 | opts.banner = "Usage: reposman.rb [OPTIONS...] -s [DIR] -r [HOST] -k [KEY]" | |
70 | opts.separator("") |
|
70 | opts.separator("") | |
71 |
|
||||
72 | opts.separator("Required arguments:") |
|
71 | opts.separator("Required arguments:") | |
73 | opts.on("-s", "--svn-dir", "use DIR as base directory for svn repositories") {|v| $repos_base = v} |
|
72 | opts.on("-s", "--svn-dir", "use DIR as base directory for svn repositories") {|v| $repos_base = v} | |
74 | opts.on("-r", "--redmine-host", "assume Redmine is hosted on HOST. Examples:", " -r redmine.example.net", " -r http://redmine.example.net", " -r https://redmine.example.net") {|v| $redmine_host = v} |
|
73 | opts.on("-r", "--redmine-host", "assume Redmine is hosted on HOST. Examples:", | |
75 | opts.on("-k", "--key KEY", "use KEY as the Redmine API key", "(you can use --key-file option as an alternative)") {|v| $api_key = v} |
|
74 | " -r redmine.example.net", | |
76 |
|
75 | " -r http://redmine.example.net", | ||
|
76 | " -r https://redmine.example.net") {|v| $redmine_host = v} | |||
|
77 | opts.on("-k", "--key KEY", "use KEY as the Redmine API key", | |||
|
78 | "(you can use --key-file option as an alternative)") {|v| $api_key = v} | |||
77 | opts.separator("") |
|
79 | opts.separator("") | |
78 | opts.separator("Options:") |
|
80 | opts.separator("Options:") | |
79 | opts.on("-o", "--owner OWNER", "owner of the repository. using the rails login", |
|
81 | opts.on("-o", "--owner OWNER", "owner of the repository. using the rails login", | |
@@ -110,13 +112,9 optparse = OptionParser.new do |opts| | |||||
110 | opts.on("-f", "--force", "force repository creation even if the project", "repository is already declared in Redmine") {$force = true} |
|
112 | opts.on("-f", "--force", "force repository creation even if the project", "repository is already declared in Redmine") {$force = true} | |
111 | opts.on("-v", "--verbose", "verbose") {$verbose += 1} |
|
113 | opts.on("-v", "--verbose", "verbose") {$verbose += 1} | |
112 | opts.on("-V", "--version", "show version and exit") {puts Version; exit} |
|
114 | opts.on("-V", "--version", "show version and exit") {puts Version; exit} | |
113 |
opts.on("-h", "--help", "show help and exit") |
|
115 | opts.on("-h", "--help", "show help and exit") {puts opts; exit 1} | |
114 | puts opts |
|
116 | opts.on("-q", "--quiet", "no log") {$quiet = true} | |
115 | exit 1 |
|
|||
116 | end |
|
|||
117 | opts.on("-q", "--quiet", "no log") {$quiet = true} |
|
|||
118 | opts.separator("") |
|
117 | opts.separator("") | |
119 |
|
||||
120 | opts.separator("Examples:") |
|
118 | opts.separator("Examples:") | |
121 | opts.separator(" reposman.rb --svn-dir=/var/svn --redmine-host=redmine.host") |
|
119 | opts.separator(" reposman.rb --svn-dir=/var/svn --redmine-host=redmine.host") | |
122 | opts.separator(" reposman.rb -s /var/git -r redmine.host -u http://git.host --scm git") |
|
120 | opts.separator(" reposman.rb -s /var/git -r redmine.host -u http://git.host --scm git") |
General Comments 0
You need to be logged in to leave comments.
Login now