Re: [cvs] bogofilter/src bf_compact,1.15,1.16
David Relson <[email protected]>
| Newsgroups | gmane.mail.bogofilter.devel |
|---|---|
| Organization | Osage Software Systems, Inc. |
| Message-ID | <[email protected]> |
On Sun, 08 May 2005 17:25:35 +0200 Matthias Andree wrote: > David Relson <[email protected]> writes: > > > Update of /cvsroot/bogofilter/bogofilter/src > > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28091 > > > > Modified Files: > > bf_compact > > Log Message: > > Use 'ls' to list database files. > > > > Index: bf_compact > > =================================================================== > > RCS file: /cvsroot/bogofilter/bogofilter/src/bf_compact,v > > retrieving revision 1.15 > > retrieving revision 1.16 > > diff -u -d -r1.15 -r1.16 > > --- bf_compact 7 May 2005 14:02:42 -0000 1.15 > > +++ bf_compact 7 May 2005 14:09:13 -0000 1.16 > > @@ -32,11 +32,11 @@ > > esac > > done > > > > -# find wordlist default > > -if [ -z "$1" ] ; then > > - FILE=`bogofilter -QQ -d "$BOGOHOME" | grep '^wordlist' | cut -f3 -d,` > > +# find wordlists > > +if [ -n "$1" ] ; then > > + FILES="$@" > > else > > - FILE="$@" > > + FILESS=`ls "$BOGOHOME" | grep .db$` > > fi > > This is bogus. Only bogofilter knows - from its configuration - what > files to expect. In transactional environments, a missing database file > in not an error per se - the data may be in the logs. Suppose I'm compacting a test directory that has no relationship to what's in bogofilter.cf. "bogofilter -QQ" is appropriate if BOGOHOME is _not_ specified. Perhaps we need: if [ -n "$1" ] ; then BOGOHOME="$1" fi ... if [ -n "$BOGOHOME" ] ; then FILES=`ls $BOGOHOME/*.db` else FILES=`bogofilter -QQ | grep ^wordlist | cut -f3 -d,` fi or something like it? _______________________________________________ Bogofilter-dev mailing list [email protected] http://www.bogofilter.org/mailman/listinfo/bogofilter-dev