[Swift-commit] r7407 - trunk/bin
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Wed Dec 11 10:33:30 CST 2013
Author: davidk
Date: 2013-12-11 10:33:30 -0600 (Wed, 11 Dec 2013)
New Revision: 7407
Modified:
trunk/bin/swiftrun
Log:
Set $RUNDIRECTORY bash variable and allow to be used in swift.properties
Useful if you want to set your swift work directory to be the same as your run directory
Modified: trunk/bin/swiftrun
===================================================================
--- trunk/bin/swiftrun 2013-12-11 16:04:40 UTC (rev 7406)
+++ trunk/bin/swiftrun 2013-12-11 16:33:30 UTC (rev 7407)
@@ -345,6 +345,20 @@
'version' => \$option_version,
);
+# Create/increment run directory
+my $run_number = 0;
+my @run_directories = <run???>;
+
+if(@run_directories) {
+ $run_number = $run_directories[-1];
+ $run_number =~ s/run//g;
+ $run_number++;
+}
+
+$run_directory = getcwd() . "/" . sprintf "run%03s", $run_number;
+$ENV{RUNDIRECTORY} = "$run_directory";
+mkdir($run_directory) || &swiftquit("Unable to create run directory $run_directory");
+
# Set @sites array from comma separated list of sites
if(defined($option_siteslist)) {
@sites = split(',', $option_siteslist);
@@ -424,18 +438,6 @@
exit;
}
-# Create/increment run directory
-my $run_number = 0;
-my @run_directories = <run???>;
-
-if(@run_directories) {
- $run_number = $run_directories[-1];
- $run_number =~ s/run//g;
- $run_number++;
-}
-
-$run_directory = getcwd() . "/" . sprintf "run%03s", $run_number;
-mkdir($run_directory) || &swiftquit("Unable to create run directory $run_directory");
@new_swift_args = ("-Dscript.dir=$run_directory/scripts");
push(@new_swift_args, "-Drestart.log.name=$run_directory/restart.log");
push(@new_swift_args, "-swiftoutlog=$run_directory/swift.out");
More information about the Swift-commit
mailing list