Sha256: e790021335c835b86b99b38e716d58971e686d379340b464bfb22df04b04ec4c

Contents?: true

Size: 600 Bytes

Versions: 10

Compression:

Stored size: 600 Bytes

Contents

require 'optparse'
class OptionParser
  alias_method :orig_parse!, :parse!
  # Extend this method to save all original options so that they can
  # be later appended to any LSF submissions
  def parse!(*args)
    lsf_options = ARGV.dup
    orig_parse!(*args)
    lsf_options -= ARGV # Now contains all original options

    # Pick whether we should be using the application's LSF instance or Origen's
    # global LSF instance
    if Origen.running_globally?
      Origen.lsf_manager.command_options = lsf_options
    else
      Origen.app.lsf_manager.command_options = lsf_options
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
origen-0.60.18 lib/origen/core_ext/option_parser/optparse.rb
origen-0.60.17 lib/origen/core_ext/option_parser/optparse.rb
origen-0.60.16 lib/origen/core_ext/option_parser/optparse.rb
origen-0.60.14 lib/origen/core_ext/option_parser/optparse.rb
origen-0.60.13 lib/origen/core_ext/option_parser/optparse.rb
origen-0.60.12 lib/origen/core_ext/option_parser/optparse.rb
origen-0.60.11 lib/origen/core_ext/option_parser/optparse.rb
origen-0.60.10 lib/origen/core_ext/option_parser/optparse.rb
origen-0.60.9 lib/origen/core_ext/option_parser/optparse.rb
origen-0.60.8 lib/origen/core_ext/option_parser/optparse.rb