Sha256: c953a2364d321792889967405af7ee2da2813a57ef756be03db9edb7e29d6fdc

Contents?: true

Size: 1.14 KB

Versions: 16

Compression:

Stored size: 1.14 KB

Contents

#!/usr/bin/env ruby
#
#  Created by Yohsuke Murase on 2009-3-25.
#  Copyright (c) 2009. All rights reserved.

require 'optparse'
require File.expand_path(File.dirname(__FILE__) + "/../lib/nera")

parser = OptionParser.new do |opts|
  opts.banner = <<-BANNER.gsub(/^    /,'')
    
    Usage: #{File.basename($0)} [options] 'nera_db_folder'
    
    BANNER
  opts.separator ""
  opts.on("-h", "--help",
          "Show this help message.") { stdout.puts opts; exit }
  opts.parse!(ARGV)
end

unless ARGV.size < 2
  raise "\n\nUsage:\n nera_addsim 'nera_db_folder' or nera_addsim"
end

folder_path = ""
if ARGV.size == 0
  unless FileTest.exists?("Jobs") and FileTest.exists?("Tables") and  FileTest.exists?("simulators.yml")
    raise "\n\nCurrent directory is not a valid database.\nThis command performs in your database directory.\n\n"
  end
  folder_path = '.'
else 
  folder_path = ARGV[0]
end

unless FileTest.directory?( folder_path + '/Simulator_classes/')
  raise "Folder #{folder_path}/Simulator_classes does not exist."
end

require File.expand_path(File.dirname(__FILE__) + "/../lib/nera_addsim/make_simulator")
NERA::CUI_Simulator_Adder.new(folder_path)

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
nera-0.7.0 bin/nera_addsim
nera-0.6.0 bin/nera_addsim
nera-0.5.2 bin/nera_addsim
nera-0.5.1 bin/nera_addsim
nera-0.5.0 bin/nera_addsim
nera-0.4.0 bin/nera_addsim
nera-0.3.1 bin/nera_addsim
nera-0.2.3 bin/nera_addsim
nera-0.2.2 bin/nera_addsim
nera-0.1.1 bin/nera_addsim
nera-0.0.3 bin/nera_addsim
nera-0.1.0 bin/nera_addsim
nera-0.0.4 bin/nera_addsim
nera-0.1.2 bin/nera_addsim
nera-0.2.0 bin/nera_addsim
nera-0.2.1 bin/nera_addsim