ruby: added random seed option to config scripts

This commit is contained in:
Derek Hower 2009-08-18 16:24:09 -05:00
parent bcaf93d182
commit efc1dddbd8
2 changed files with 14 additions and 0 deletions

View file

@ -34,6 +34,13 @@ for i in 0..$*.size-1 do
elsif $*[i] == "-m"
num_memories = $*[i+1].to_i
i = i+1
elsif $*[i] == "-R"
if $*[i+1] == "rand"
RubySystem.random_seed = "rand"
else
RubySystem.random_seed = $*[i+1].to_i
end
i = i+ 1
elsif $*[i] == "-s"
memory_size_mb = $*[i+1].to_i
i = i + 1

View file

@ -40,6 +40,13 @@ for i in 0..$*.size-1 do
elsif $*[i] == "-p"
num_cores = $*[i+1].to_i
i = i+1
elsif $*[i] == "-R"
if $*[i+1] == "rand"
RubySystem.random_seed = "rand"
else
RubySystem.random_seed = $*[i+1].to_i
end
i = i+ 1
elsif $*[i] == "-s"
memory_size_mb = $*[i+1].to_i
i = i + 1