lib/coderunner.rb in coderunner-0.14.24 vs lib/coderunner.rb in coderunner-0.15.0
- old
+ new
@@ -163,11 +163,11 @@
["--use-large-cache", "-U", GetoptLong::NO_ARGUMENT, %[Use the large cache for speed. No run data will be updated.]],
["--version", "-v", GetoptLong::REQUIRED_ARGUMENT, %[Specify the version of the simulation code being used. Only has an effect for certain code modules.]],
["--wall-mins", "-W", GetoptLong::REQUIRED_ARGUMENT, %[Specify the wall clock limit in minutes.]],
["--write-options", "-w", GetoptLong::REQUIRED_ARGUMENT, %[Use when plotting graphs. A hash of custom options which are applied to the graphkit just before plotting it; for example: -w '{xlabel: 'X Axis Quantity, log_axis: 'y'}']],
["--executable", "-X", GetoptLong::REQUIRED_ARGUMENT, %[Specify the location of the executable of the simulation code. It only needs to be specified once in any folder, unless it needs to be changed.]],
- ["--other-folder", "-Y", GetoptLong::REQUIRED_ARGUMENT, %[Run CodeRunner in a different folder. On a local machine 'coderunner st -Y some/other/folder' is identical to 'cd some/other/folder; coderunner st -Y'. However, this flag can also be used for remote folders using RemoteCodeRunner (as long as CodeRunner is installed on the remote machine). e.g. -Y username@machine.location:path/to/folder.]],
+ ["--other-folder", "-Y", GetoptLong::REQUIRED_ARGUMENT, %[Run CodeRunner in a different folder. On a local machine 'coderunner st -Y some/other/folder' is identical to 'cd some/other/folder; coderunner st -Y'. However, this flag can also be used for remote folders using RemoteCodeRunner (as long as CodeRunner is installed on the remote machine). e.g. -Y username@machine.location:path/to/folder. If this option is specified multiple times, a merged runner will be created from the set of specified folders.]],
["--supplementary-options", "-y", GetoptLong::REQUIRED_ARGUMENT],
["--server", "-Z", GetoptLong::REQUIRED_ARGUMENT, %[Technical use only]],
["--log", "-z", GetoptLong::NO_ARGUMENT, %[Switch logging on (currently not working very well (05/2010)).]] # :nodoc:
]
@@ -280,9 +280,19 @@
copts[:x] = arg.to_i
when "--graph"
copts[:G].push arg
when "--run-graph"
copts[:g].push arg
+ when "--other-folder"
+ if copts[:Y]
+ if copts[:Y].kind_of? String
+ copts[:Y] = [copts[:Y], arg]
+ else
+ copts[:Y].push arg
+ end
+ else
+ copts[:Y] = arg
+ end
# when "--cancel"
# copts[:K] = arg.to_i
when "--multiple-processes"
copts[:M] = arg.to_i
when "--film"