[Swift-commit] r7408 - branches/release-0.95/bin

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Wed Dec 11 10:33:47 CST 2013


Author: davidk
Date: 2013-12-11 10:33:47 -0600 (Wed, 11 Dec 2013)
New Revision: 7408

Modified:
   branches/release-0.95/bin/swiftrun
Log:
$RUNDIRECTORY


Modified: branches/release-0.95/bin/swiftrun
===================================================================
--- branches/release-0.95/bin/swiftrun	2013-12-11 16:33:30 UTC (rev 7407)
+++ branches/release-0.95/bin/swiftrun	2013-12-11 16:33:47 UTC (rev 7408)
@@ -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