INN commit: trunk/control (docheckgroups.in)
INN Commit
Russ_Allbery at isc.org
Wed Feb 18 19:56:00 UTC 2009
Date: Wednesday, February 18, 2009 @ 11:56:00
Author: iulius
Revision: 8319
The pattern "a\+" is not recognized by a few sed implementations.
Therefore, we use "aa*" instead.
Modified:
trunk/control/docheckgroups.in
------------------+
docheckgroups.in | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
Modified: docheckgroups.in
===================================================================
--- docheckgroups.in 2009-02-14 20:42:04 UTC (rev 8318)
+++ docheckgroups.in 2009-02-18 19:56:00 UTC (rev 8319)
@@ -59,10 +59,11 @@
comm -23 ${T}/$$nm.all ${T}/$$add >${T}/$$notmod
## Check for missing and obsolete newsgroups descriptions (possibly
-## in wire format).
-${EGREP} "${PATS}" ${NEWSGROUPS} | ${EGREP} "${1:-.}" | ${SED} 's/[ ]\+/ /' | ${SORT} >${T}/$$localdesc
+## in wire format). A few sed implementations do not recognize
+## "[ ]\+", so we use " [ ]*" instead.
+${EGREP} "${PATS}" ${NEWSGROUPS} | ${EGREP} "${1:-.}" | ${SED} 's/ [ ]*/ /' | ${SORT} >${T}/$$localdesc
${EGREP} "${PATS}" ${T}/$$msg | ${EGREP} "${1:-.}" | ${SED} 's/\r\?$//' \
- | ${SED} 's/[ ]\+/ /' | ${SORT} >${T}/$$newdesc
+ | ${SED} 's/ [ ]*/ /' | ${SORT} >${T}/$$newdesc
comm -13 ${T}/$$localdesc ${T}/$$newdesc >${T}/$$missingdesc
comm -23 ${T}/$$localdesc ${T}/$$newdesc >${T}/$$removedesc
@@ -73,7 +74,7 @@
${EGREP} "${PATS}" ${NEWSGROUPS} | ${EGREP} -v "${1:-.}" >>${T}/$$updatednewsgroups
cat ${T}/$$newdesc >>${T}/$$updatednewsgroups
mv -f ${NEWSGROUPS} ${NEWSGROUPS}.old
- ${SORT} ${T}/$$updatednewsgroups | ${SED} 's/[ ]\+/ /' \
+ ${SORT} ${T}/$$updatednewsgroups | ${SED} 's/ [ ]*/ /' \
| ${AWK} -F'\t' '{if (length($1) < 8) {print $1"\t\t\t"$2} \
else {if (length($1) < 16) {print $1"\t\t"$2} \
else {print $1"\t"$2}}}' >${NEWSGROUPS}
More information about the inn-committers
mailing list