[cvs] bogofilter/src bf_resize,1.3,1.4
Fast Bayesian spam filter along lines suggested by Paul Graham
Brought to you by:
m-a
From: <m-...@us...> - 2004-12-26 10:14:26
|
Update of /cvsroot/bogofilter/bogofilter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27699 Modified Files: bf_resize Log Message: Bugfix: Remove bogus yes(1) command before bogoutil. Robustness: Detect egrep errors (exit code 2), ignore only "no match" (code 1). Index: bf_resize =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/bf_resize,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- bf_resize 24 Dec 2004 22:05:15 -0000 1.3 +++ bf_resize 26 Dec 2004 10:14:10 -0000 1.4 @@ -40,9 +40,12 @@ a=$(( $a * 2 )) touch "$DIR"/DB_CONFIG -egrep -v '^set_lk_max_(locks|objects)' "$DIR"/DB_CONFIG >"$DIR"/DB_CONFIG.new || true +( + set +e + egrep -v '^set_lk_max_(locks|objects)' "$DIR"/DB_CONFIG >"$DIR"/DB_CONFIG.new +) +if [ $? -ge 2 ] ; then exit 1 ; fi echo >>"$DIR"/DB_CONFIG.new set_lk_max_locks $a echo >>"$DIR"/DB_CONFIG.new set_lk_max_objects $a mv "$DIR"/DB_CONFIG.new "$DIR"/DB_CONFIG -yes bogoutil --db-recover="$DIR" |