builder/extra/cluster-home/lib/ruby/tungsten/script.rb
def load_ini_parameters(file, section_name)
    unless File.exists?(file)
      return
    end
    
    unless section_name.is_a?(Array)
      section_name = [section_name]
    end
    section_name.delete_if{|n| n.to_s() == ""}
    
    if section_name.size() == 0
      return
    end
    
    parameters = TU.parse_ini_file(file, false)
    section_name.each{
      |section|
      if section.to_s() == ""
        next
      end
      
      unless parameters.has_key?(section)
        next
      end
      
      parameters[section].each{
        |line|
        # Single character parameters get a single dash
        if line.length() == 1
          @ini_parameters << "-#{line}"
        else
          @ini_parameters << "--#{line}"
        end
      }
    }
  end
# Convert the parsed INI contents into the command line argument style
Convert the parsed INI contents into the command line argument style
Convert the parsed INI contents into the command line argument style
def load_ini_parameters(file, section_name)
    unless File.exists?(file)
      return
    end
    unless section_name.is_a?(Array)
      section_name = [section_name]
    end
    section_name.delete_if{|n| n.to_s() == ""}
    if section_name.size() == 0
      return
    end
    parameters = TU.parse_ini_file(file, false)
    section_name.each{
      |section|
      if section.to_s() == ""
        next
      end
      unless parameters.has_key?(section)
        next
      end
      parameters[section].each{
        |line|
        if line.length() == 1
          @ini_parameters << "-#{line}"
        else
          @ini_parameters << "--#{line}"
        end
      }
    }
  end
def load_ini_parameters ( file , section_name ) unless File . exists? ( file ) return end unless section_name . is_a? ( Array ) section_name = [ section_name ] end section_name . delete_if { | n | n . to_s ( ) == "" } if section_name . size ( ) == 0 return end parameters = TU . parse_ini_file ( file , false ) section_name . each { | section | if section . to_s ( ) == "" next end unless parameters . has_key? ( section ) next end parameters [ section ] . each { | line | if line . length ( ) == 1 @ini_parameters << "-#{line}" else @ini_parameters << "--#{line}" end } } end
Convert the parsed INI contents into the command line argument style
Convert the parsed INI contents into the command line argument style
# Single character parameters get a single dash
file
section_name