#!/usr/bin/env ruby # XXX What can go wrong with this loading approach? libdir = File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")) if File.directory?(libdir) and File.exists?(File.join(libdir, "automateit.rb")) $LOAD_PATH.unshift(libdir) end require 'rubygems' require 'optparse' require 'automateit' include AutomateIt::Constants OptionParser.new do |parser| PROG = File.basename($0) opts = {} parser.banner = < opts[:project], :verbosity => opts[:verbosity] ) interpreter.preview true if opts[:preview] for host in interpreter.hosts_tagged_with(query).sort cmd = "ssh %s %s" % [host, commands.join(" ").shell_escape] interpreter.sh(cmd) end exit 0 end