Sha256: f4b173e75d09c19ed536cb81d4b166c1458aae34d39879caad85c0420c235d78
Contents?: true
Size: 1016 Bytes
Versions: 7
Compression:
Stored size: 1016 Bytes
Contents
#!/usr/bin/env ruby require "#{File.dirname(__FILE__)}/../config/boot" require 'optparse' # This hash will hold all of the options options = {} optparse = OptionParser.new do|opts| opts.banner = "Run the app with Adobe Debuger Launcher. \n" opts.banner += "Usage: script/run [--pubid publisher-id] [--nodebug] [--arguments]" opts.on( '-p', '--pubid [pubid]', 'Publisher ID' ) do |pubid| options[:pubid] = pubid end opts.on( '-n', '--nodebug [nodebug]', 'Disable degub options' ) do |nodebug| options[:nodebug] = true if nodebug end opts.on( '-a', '--arguments [arguments]', 'Arguments for the app' ) do |args| options[:arguments] = args end # help screen opts.on( '-h', '--help', 'Help screen' ) do puts opts exit end end optparse.parse! cmd = "#{MoonwalkAir.air_bin}/adl" cmd+= " -pubid #{options[:pubid]}" if options.include?(:pubid) cmd+= " -nodebug" if options.include?(:nodebug) cmd+= " #{MoonwalkAir.root}/descriptor.xml -- #{options[:arguments]}" system cmd
Version data entries
7 entries across 7 versions & 1 rubygems