[Swift-commit] r6826 - trunk/bin

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Mon Aug 12 11:57:18 CDT 2013


Author: davidk
Date: 2013-08-12 11:57:17 -0500 (Mon, 12 Aug 2013)
New Revision: 6826

Modified:
   trunk/bin/swiftrun
Log:
Allow list of sites to run on from within a swift.properties file


Modified: trunk/bin/swiftrun
===================================================================
--- trunk/bin/swiftrun	2013-08-12 15:43:08 UTC (rev 6825)
+++ trunk/bin/swiftrun	2013-08-12 16:57:17 UTC (rev 6826)
@@ -122,7 +122,7 @@
    while( my( $key, $value ) = each( %properties ) ) {
       # Ignore properties that start with app. or site.
       next if $key =~ /^\s*app./;
-      next if $key =~ /^\s*site./;
+      next if $key =~ /^\s*site/;
       print PROPERTY_FILE "$key=$value\n";
    }
    push( @new_swift_args, "-config $run_directory/$property_filename" );
@@ -135,6 +135,10 @@
    print SITES "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
    print SITES "<config xmlns=\"http://www.ci.uchicago.edu/swift/SwiftSites\">\n";
 
+   if(defined ($properties{site})) { 
+      push(@sites, split(',', $properties{site}))
+   } 
+
    foreach my $site(@sites) {
       print SITES &create_pool_entry($site);
    }
@@ -234,8 +238,8 @@
 mkdir($run_directory) || die "Unable to create run directory $run_directory\n";
 
 # Write swift configuration files
-&write_sites("sites.xml") if defined( $option_siteslist );
-&write_apps("tc.data")    if ( !defined( $option_tcfile ) && defined( $option_siteslist ));
+&write_sites("sites.xml") if defined( $option_siteslist ) || defined($properties{site});
+&write_apps("tc.data")    if !defined( $option_tcfile ) && ( defined( $option_siteslist ) || defined($properties{site}));
 &write_properties("cf")   if !defined( $option_config );
 
 # Repair args with dots




More information about the Swift-commit mailing list