mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
Make capify understand simple command-line switches
git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@6707 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
9047a756fe
commit
dee88819f3
2 changed files with 22 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
||||||
*SVN*
|
*SVN*
|
||||||
|
|
||||||
* Make the server definition itself available to SSH channels, rather that just the host name [Jamis Buck]
|
* Make `capify' understand simple command-line switches [Jamis Buck]
|
||||||
|
|
||||||
|
* Make the server definition itself available to SSH channels, rather than just the host name [Jamis Buck]
|
||||||
|
|
||||||
* Identify servers by their complete credentials in logs, rather than simply by hostname [Jamis Buck]
|
* Identify servers by their complete credentials in logs, rather than simply by hostname [Jamis Buck]
|
||||||
|
|
||||||
|
|
19
bin/capify
19
bin/capify
|
@ -1,5 +1,24 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
|
require 'optparse'
|
||||||
|
|
||||||
|
OptionParser.new do |opts|
|
||||||
|
opts.banner = "Usage: #{File.basename($0)} [path]"
|
||||||
|
|
||||||
|
opts.on("-h", "--help", "Displays this help info") do
|
||||||
|
puts opts
|
||||||
|
exit 0
|
||||||
|
end
|
||||||
|
|
||||||
|
begin
|
||||||
|
opts.parse!(ARGV)
|
||||||
|
rescue OptionParser::ParseError => e
|
||||||
|
warn e.message
|
||||||
|
puts opts
|
||||||
|
exit 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if ARGV.empty?
|
if ARGV.empty?
|
||||||
abort "Please specify the directory to capify, e.g. `#{File.basename($0)} .'"
|
abort "Please specify the directory to capify, e.g. `#{File.basename($0)} .'"
|
||||||
elsif !File.exists?(ARGV.first)
|
elsif !File.exists?(ARGV.first)
|
||||||
|
|
Loading…
Reference in a new issue