Sha256: a12de044bb0e56308aa2590c4ddeb1db1a54baebc47539d4efdac1af9d51b989
Contents?: true
Size: 1.52 KB
Versions: 5
Compression:
Stored size: 1.52 KB
Contents
#!/usr/bin/env ruby begin require 'ruic' rescue LoadError require 'rubygems' require 'ruic' end USAGE = <<ENDUSAGE Usage: ruic [-h] [-v] [-i] [-m path/to/MetaData.xml] [-u path/to/my.uia] [myscript.ruic] ENDUSAGE HELP = <<ENDHELP -h, --help Show this help. -v, --version Show the version number (#{RUIC::VERSION}). -i, --interactive Enter an interactive REPL after running the script (if any). -m, --metadata The path to use for MetaData.xml Default: #{RUIC::DEFAULTMETADATA} Will be overridden by any `metadata` call in your script. -u, --uia An application to load. ENDHELP ARGS = {} UNFLAGGED_ARGS = [ :script ] next_arg = UNFLAGGED_ARGS.first ARGV.each do |arg| case arg when '-h','--help' then ARGS[:help] = true when '-v','--version' then ARGS[:version] = true when '-i','--interactive' then ARGS[:interactive] = true when '-m','--metadata' then next_arg = :meta when '-u','--uia' then next_arg = :uia else if next_arg ARGS[next_arg] = arg UNFLAGGED_ARGS.delete( next_arg ) end next_arg = UNFLAGGED_ARGS.first end end puts "RUIC v#{RUIC::VERSION}" if ARGS[:version] if ARGS[:help] puts USAGE, HELP exit 0 end if ARGS[:meta] RUIC::DEFAULTMETADATA.replace File.expand_path(ARGS[:meta]) end if ARGS[:script] && File.extname(ARGS[:script])==".uia" ARGS[:uia] = ARGS[:script] ARGS[:script] = nil end RUIC script:ARGS[:script], uia:ARGS[:uia], repl:ARGS[:interactive] || !ARGS[:script]
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
RUIC-0.2.5 | bin/ruic |
RUIC-0.2.3 | bin/ruic |
RUIC-0.2.2 | bin/ruic |
RUIC-0.2.0 | bin/ruic |
RUIC-0.1.0 | bin/ruic |