2010-04-13 04:00:42 +00:00
|
|
|
#!/usr/bin/env ruby
|
|
|
|
begin
|
|
|
|
require File.expand_path('../../.bundle/environment', __FILE__)
|
|
|
|
rescue LoadError
|
|
|
|
# Fallback on rubygems
|
|
|
|
require "rubygems"
|
|
|
|
end
|
|
|
|
|
|
|
|
require 'git-style-binary/command'
|
|
|
|
|
|
|
|
# Get library
|
|
|
|
libdir = File.join(File.dirname(__FILE__), '..', 'lib')
|
|
|
|
require File.expand_path('vagrant', libdir)
|
|
|
|
|
|
|
|
GitStyleBinary.command do
|
|
|
|
short_desc "outputs .ssh/config valid syntax for connecting to this environment via ssh"
|
|
|
|
banner <<-EOS
|
|
|
|
Usage: #{command.full_name} #{all_options_string}
|
|
|
|
|
|
|
|
Outputs a .ssh/config valid entry for connecting (via SCP, git, etc.)
|
|
|
|
to the current environment.
|
|
|
|
|
|
|
|
EOS
|
|
|
|
|
2010-04-13 04:28:37 +00:00
|
|
|
opt :host, "the host key for the entry", :type => :string
|
|
|
|
|
2010-04-13 04:00:42 +00:00
|
|
|
run do |command|
|
2010-04-13 04:28:37 +00:00
|
|
|
Vagrant::Commands.execute(:ssh_config, command.opts)
|
2010-04-13 04:00:42 +00:00
|
|
|
end
|
|
|
|
end
|