You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by do...@apache.org on 2007/05/04 22:24:48 UTC

svn commit: r535372 - /spamassassin/rules/trunk/sandbox/dos/new-rule-score-gen/generate-new-scores

Author: dos
Date: Fri May  4 13:24:47 2007
New Revision: 535372

URL: http://svn.apache.org/viewvc?view=rev&rev=535372
Log:
remove some GNUisms, moving towards this running on the Solaris zone

Modified:
    spamassassin/rules/trunk/sandbox/dos/new-rule-score-gen/generate-new-scores

Modified: spamassassin/rules/trunk/sandbox/dos/new-rule-score-gen/generate-new-scores
URL: http://svn.apache.org/viewvc/spamassassin/rules/trunk/sandbox/dos/new-rule-score-gen/generate-new-scores?view=diff&rev=535372&r1=535371&r2=535372
==============================================================================
--- spamassassin/rules/trunk/sandbox/dos/new-rule-score-gen/generate-new-scores (original)
+++ spamassassin/rules/trunk/sandbox/dos/new-rule-score-gen/generate-new-scores Fri May  4 13:24:47 2007
@@ -48,22 +48,22 @@
 mkdir usable-corpus-set$SCORESET
 
 if [ $SCORESET -eq 3 ]; then
-  for FILE in `find -type f -regex .*am-bayes-net-.*`;
+  for FILE in `find . -type f -name "*am-bayes-net-*"`;
   do
     ln $FILE usable-corpus-set$SCORESET/$FILE
   done
 elif [ $SCORESET -eq 2 ]; then
-  for FILE in `find -type f -regex .*am-bayes-.* | grep -v net-`;
+  for FILE in `find . -type f -name "*am-bayes-*" | grep -v net-`;
   do
     ln $FILE usable-corpus-set$SCORESET/$FILE
   done
 elif [ $SCORESET -eq 1 ]; then
-  for FILE in `find -type f -regex .*am-net-.*`;
+  for FILE in `find . -type f -name "*am-net-*"`;
   do
     ln $FILE usable-corpus-set$SCORESET/$FILE
   done
 elif [ $SCORESET -eq 0 ]; then
-  for FILE in `find -type f -regex .*am-.* | grep -v net- | grep -v bayes-`;
+  for FILE in `find . -type f -name "*am-*" | grep -v net- | grep -v bayes-`;
   do
     ln $FILE usable-corpus-set$SCORESET/$FILE
   done
@@ -73,15 +73,21 @@
 fi
   
 cd usable-corpus-set$SCORESET
+
+# cthielen's ham logs seem to have a shitload of spam in them
+rm -f *cthielen.log
+
 REVISION=`head * | grep "SVN revision" | cut -d" " -f4 | sort -rn | head -1`
-for FILE in `find -type f`;
+if [ "$REVISION" == "" ]; then
+  echo "No logs for scoreset"
+  exit 1
+fi
+
+for FILE in `find . -type f`;
 do
   head $FILE | grep "SVN revision: $REVISION" || rm $FILE
 done
 
-# cthielen's ham logs seem to have a shitload of spam in them
-rm -f *cthielen.log
-
 cd ../..
 
 # make note of what logs we are going to use
@@ -99,11 +105,12 @@
 cd trunk-new-rules-set$SCORESET
 svn up -r $REVISION rulesrc/
 
-patch -p0 < ../masses-Makefile.patch
-cd ..
-cp -a lock-scores trunk-new-rules-set$SCORESET/masses/lock-scores
-cp -a extract-new-scores trunk-new-rules-set$SCORESET/masses/extract-new-scores
-cp -a add-hitless-active-to-freqs trunk-new-rules-set$SCORESET/masses/add-hitless-active-to-freqs
+cd masses
+patch < ../../masses-Makefile.patch
+cd ../..
+cp lock-scores trunk-new-rules-set$SCORESET/masses/lock-scores
+cp extract-new-scores trunk-new-rules-set$SCORESET/masses/extract-new-scores
+cp add-hitless-active-to-freqs trunk-new-rules-set$SCORESET/masses/add-hitless-active-to-freqs
 
 cd trunk-new-rules-set$SCORESET
 perl Makefile.PL < /dev/null