Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 28 lines (22 sloc) 643 Bytes
#!/usr/bin/env ruby
require 'mcollective'
Version = MCollective.version
known_applications = MCollective::Applications.list
# links from mc-ping to mc will result in ping being run
if $0 =~ /mc\-(.+)$/
app_name = $1
else
app_name = ARGV.first
ARGV.delete_at(0)
end
if known_applications.include?(app_name)
# make sure the various options classes shows the right help etc
$0 = app_name
MCollective::Applications.run(app_name)
else
puts "The Marionette Collective version #{MCollective.version}"
puts
puts "#{$0}: command (options)"
puts
puts "Known commands: #{known_applications.join " "}"
end