[alt.sources.wanted] Automated update of "paths" with new comp.mail.maps

bmedley@hounix.uucp (Bert Medley) (12/30/90)

How does one automate the updating of "paths" with new uucp maps that
arrive in comp.mail.maps??  It should be possible using some shell
script.  Rather than re-inventing the wheel, I would appreciate it if
the necessary steps could be posted.  This node (hounix) is experiencing
some problems with news reception.  Please followup with e-mail to
bert@medley.ssdl.com.  Thanks.


-- 
Bert Medley                       | UUCP:      bmedley@hounix.uucp
Synercom Technology               |   or       ..uhnix1!hounix!bmedley
2500 City West Blvd., Suite 1100  | Internet:  bmedley%hounix@uh.edu
Houston TX 77042                  | "My opinions are my own ..."

jpr@jpradley.jpr.com (Jean-Pierre Radley) (12/31/90)

In article <1990Dec30.003823.5966@hounix.uucp> bmedley@hounix.uucp (Bert Medley) writes:
>How does one automate the updating of "paths" with new uucp maps that
>arrive in comp.mail.maps??  It should be possible using some shell
>script.  Rather than re-inventing the wheel, I would appreciate it if
>the necessary steps could be posted.  This node (hounix) is experiencing
>some problems with news reception.  Please followup with e-mail to
>bert@medley.ssdl.com.  Thanks.

I just answered this in e-mail yesterday to someone else, but since my answer
isn't too long, I might as well post it.

I keep my binaries for pathalias and lcasep, and the maps themselves, right in
/usr/spool/news/comp/mail/maps.

Cron runs this script for me in the wee hours:

: remap -- if articles exist newer than paths file, extract and process

PATHS=/usr/lib/uucp/paths
NEW=0

for F in `ls -t [1-9]* $PATHS | sed -n -e "\-$PATHS-q" -e p | sort -n`
	do	sed 1,17d $F | sh
		NEW=1
	done

[ "$NEW" -eq 1 ] &&
pathalias -i d* u* | lcasep | sort -o paths &&
chgrp uucp paths &&
chown uucp paths &&
cp paths $PATHS

 Jean-Pierre Radley	    NYC Public Unix	jpr@jpr.com	CIS: 72160,1341