[Swift-commit] r3527 - usertools/swift/swiftconfig/bin

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Thu Aug 12 09:17:09 CDT 2010


Author: davidk
Date: 2010-08-12 09:17:09 -0500 (Thu, 12 Aug 2010)
New Revision: 3527

Modified:
   usertools/swift/swiftconfig/bin/swiftrun
Log:
Pass unknown options to swift


Modified: usertools/swift/swiftconfig/bin/swiftrun
===================================================================
--- usertools/swift/swiftconfig/bin/swiftrun	2010-08-12 13:49:11 UTC (rev 3526)
+++ usertools/swift/swiftconfig/bin/swiftrun	2010-08-12 14:17:09 UTC (rev 3527)
@@ -7,7 +7,7 @@
 use Cwd qw(abs_path);
 use File::Copy;
 use File::Path;
-use Getopt::Long;
+use Getopt::Long qw(:config permute pass_through);
 use File::Which qw(which where);
 use XML::Simple;
 
@@ -85,6 +85,7 @@
     'input|inputs=s{,}' => \@option_inputs,
 );
 
+
 # Verify user-created profile info exists
 my ( $seconds, $minutes, $hours, $days, $months, $years, @junk ) =
     localtime(time);
@@ -105,7 +106,6 @@
     # Handle 'all' to use all available configurations at once
     if( lc($site) eq 'all' ) {
         foreach my $all_site(<$dotswift_directory/sites/*>) {
-            print "all_site is: \"" . $all_site . "\"\n";
             if ( !-d "$all_site" ) {
                 die "Unable to find directory for $all_site\n";
             }
@@ -172,7 +172,15 @@
 my $run_directory = "$dotswift_directory/jobs/$script_filename/$date_string";
 chdir("$run_directory") || die "Unable to chdir to $run_directory\n";
 print "Submitting job. Check $run_directory for details\n";
-system(
-    "swift -sites.file $site_filename -tc.file $run_directory/tc.data $option_script"
-);
+my $system_command = "swift -sites.file $site_filename "
+    . "-tc.file $run_directory/tc.data "
+    . "$option_script ";
 
+# Add unknown options
+foreach my $unknown_argument (@ARGV) {
+    $system_command = "$system_command $unknown_argument ";
+}
+
+# Execute
+system($system_command);
+




More information about the Swift-commit mailing list