Sha256: 5bf259d2df075bc27077ee5cf1143dcffa10c142e11197d7768d328ca8be681f

Contents?: true

Size: 800 Bytes

Versions: 15

Compression:

Stored size: 800 Bytes

Contents

#!/usr/bin/ruby


options_file = "local.cfg"

moving_options_file = false
mv_options_file = ""
if File.exist?(options_file)
  mv_options_file = options_file + ".backup"
  File.rename(options_file, mv_options_file)
  moving_options_file = true
end

filetype = "msmat"
files = ARGV.to_a

base = "Msvis_filename"

if files.size == 0
  puts "msvis.rb file.msmat ..."
  puts "right now only creates a local.cfg file"
  exit
end

File.open(options_file, "w") do |fh|
  fh.print "Msvis_filetype = " + filetype + "\n"
  fh.print "Msvis_num = " + files.size.to_s + "\n"
  cnt = 0
  files.each do |file|
    fh.print( base + cnt.to_s + " = " + "\"#{file}\"" + "\n" )
    cnt += 1
  end
end

#exec "./msvis"

#File.unlink options_file

#if moving_options_file
#  File.rename mv_options_file, options_file
#end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
mspire-0.4.9 script/msvis.rb
mspire-0.1.3 script/msvis.rb
mspire-0.1.5 script/msvis.rb
mspire-0.2.0 script/msvis.rb
mspire-0.2.4 script/msvis.rb
mspire-0.2.2 script/msvis.rb
mspire-0.3.0 script/msvis.rb
mspire-0.2.1 script/msvis.rb
mspire-0.1.7 script/msvis.rb
mspire-0.3.1 script/msvis.rb
mspire-0.3.9 script/msvis.rb
mspire-0.4.2 script/msvis.rb
mspire-0.4.4 script/msvis.rb
mspire-0.4.7 script/msvis.rb
mspire-0.4.5 script/msvis.rb