Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 45 lines (40 sloc) 1.153 kB
#!/usr/bin/env ruby
require File.expand_path(File.join(File.dirname(__FILE__), %w[.. lib hitch]))
args = ARGV
options = []
opts = OptionParser.new do |opts|
opts.banner = "Usage: hitch [options] first_pair_username second_pair_username"
opts.separator ""
opts.separator "General options:"
opts.on("-s", "--setup", "Print out shell goodies") do
options = [:setup]
end
opts.on("--setup-path", "Print out path to shell goodies") do
options = [:print_setup_path]
end
opts.on("-e N", "--expire N", Integer, "Expire pair information in N hours.") do |n|
options = [:expire, n]
end
opts.on("-u", "--unhitch", "Clear pair information") do
options = [:unhitch]
end
opts.separator ""
opts.separator "Common options:"
opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit
end
opts.on_tail("-v", "--version", "Show version") do
abort "hitch v#{Hitch::VERSION}"
end
end
if args.any?
opts.parse!(args)
if options.delete(:expire)
system(Hitch.expire_command(options.pop))
end
options = [:export, args] if options.empty?
else
options = [:print_info]
end
Hitch.send(*options)
Jump to Line
Something went wrong with that request. Please try again.