You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2007/09/26 13:30:54 UTC

svn commit: r579605 - /spamassassin/trunk/build/automc/run_nightly

Author: jm
Date: Wed Sep 26 04:30:53 2007
New Revision: 579605

URL: http://svn.apache.org/viewvc?rev=579605&view=rev
Log:
er, better perl

Modified:
    spamassassin/trunk/build/automc/run_nightly

Modified: spamassassin/trunk/build/automc/run_nightly
URL: http://svn.apache.org/viewvc/spamassassin/trunk/build/automc/run_nightly?rev=579605&r1=579604&r2=579605&view=diff
==============================================================================
--- spamassassin/trunk/build/automc/run_nightly (original)
+++ spamassassin/trunk/build/automc/run_nightly Wed Sep 26 04:30:53 2007
@@ -62,10 +62,15 @@
     # the string __RSYNC_PASSWORD__ will be replaced with the
     # contents of /export/home/bbmass/mc-nightly/USERNAME/rsync_password
     perl -pe '
-      my $rsync_password=`cat $dir/rsync_password`;
-      my $clienthosts=`cat $dir/svn/build/nightlymc/clienthosts`;
-      s/__RSYNC_PASSWORD__/$rsync_password/g;
-      s/__CLIENTHOSTS__/$clienthosts/g;
+      s/__RSYNC_PASSWORD__/ incfile("rsync_password") /eg;
+      s/__CLIENTHOSTS__/ incfile("svn/build/nightlymc/clienthosts") /eg;
+
+      sub incfile {
+        my $file = shift;
+        my $new=`cat '"$dir"'/$file`;
+        $new =~ s/\s+/ /gs;
+        return $new;
+      }
     ' $dir/svn/build/nightlymc/corpus.$user > $dir/.corpus
 
     # use bash to work around Solaris breakage