You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2005/10/31 05:20:12 UTC

svn commit: r329728 - /spamassassin/trunk/masses/mass-check

Author: felicity
Date: Sun Oct 30 20:20:10 2005
New Revision: 329728

URL: http://svn.apache.org/viewcvs?rev=329728&view=rev
Log:
since mass-check may be run from a non-working copy directory, it needs to know to deal with the directory that mass-check lives in instead

Modified:
    spamassassin/trunk/masses/mass-check

Modified: spamassassin/trunk/masses/mass-check
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/masses/mass-check?rev=329728&r1=329727&r2=329728&view=diff
==============================================================================
--- spamassassin/trunk/masses/mass-check (original)
+++ spamassassin/trunk/masses/mass-check Sun Oct 30 20:20:10 2005
@@ -673,12 +673,15 @@
 sub get_current_svn_revision {
   my $revision;
 
-  if (-d ".svn" || -f "svninfo.tmp") {
-    if (-f "svninfo.tmp") {
+  my $dir = $FindBin::Bin || ".";
+
+  if (-d "$dir/.svn" || -f "$dir/svninfo.tmp") {
+    if (-f "$dir/svninfo.tmp") {
       # created by build/automc/buildbot_ready for chrooted mass-checks
-      open (SVNINFO, "< svninfo.tmp");
-    } elsif (-d ".svn") {
-      open (SVNINFO, "svn info --non-interactive 2>&1 |");
+      open (SVNINFO, "< $dir/svninfo.tmp");
+    } 
+    else {
+      open (SVNINFO, "svn info --non-interactive $dir 2>&1 |");
     }
 
     while (<SVNINFO>) {