31 lines
746 B
Ruby
Executable File
31 lines
746 B
Ruby
Executable File
#!/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
|
|
|
|
opt :host, "the host key for the entry", :type => :string
|
|
|
|
run do |command|
|
|
Vagrant::Commands.execute(:ssh_config, command.opts)
|
|
end
|
|
end
|