Path: utzoo!yunexus!geac!syntron!gerry From: gerry@syntron.UUCP (G. Roderick Singleton) Newsgroups: news.sysadmin Subject: Re: Unpacking comp.mail.maps files Message-ID: <246@syntron.UUCP> Date: 13 Feb 88 01:23:09 GMT Article-I.D.: syntron.246 Posted: Fri Feb 12 20:23:09 1988 References: <1059@vsedev.VSE.COM> Reply-To: gerry@syntron.UUCP (G. Roderick Singleton) Organization: Syntronics Manufacturing Inc., Richmond Hill, Ontario, Canada Lines: 100 In article <1059@vsedev.VSE.COM> ron@vsedev.VSE.COM (Ron Flax) writes: >This is really a query to determine the best, if there is one, way to >unpack comp.mail.maps files, since they seem to come in every day or >so now. > >I used to simply type '1000-1050w | (cd /v/hostnames/map; unshar)' at >rn when the maps came in once a month or so... but now since the >distribution is split across the entire month, this is really a pain! >Plus the fact that I can't seem to figure out when the damned cut off >is :-) > >-- >ron@vsedev.vse.com (Ron Flax) >uucp: ..!uunet!vsedev!ron >inet: vsedev!ron@uunet.uu.net Some time ago a friend gave me a map handler that does a marvelous job. It even takes care of supersedes. I mangled it a bit of course but because it's so useful here (we are currently at the end of a feed) I am including it for yours and anyone else's use: #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh xmaps <<'END_OF_xmaps' X#! /bin/sh X X# Moves the UUCP maps to the appropriate directory, un-shars them, and X# pitches the originals. X X# Written 30 December 1987 by Stanley F. Quayle X# modified to automatically execute pathalias and pathproc to generate and X# install paths -- 14 January 1988 by G. Roderick Singleton X Xumask 002 X X# Exit if news is executing (and probably unbatching) Xif [ -r /usr/spool/uucp/LCK.XQT ] ; then X echo "News is being received, cannot execute." X exit 0 Xfi X X# Exit if no maps have been received recently Xgrep -s "comp.mail.maps" /usr/lib/news/log || exit 0 X X# Create temporary directory Xmkdir /usr/u/Maps/tmp X X# Change directory Xcd /usr/u/Maps/tmp X X# Move the maps Xmv /usr/spool/news/comp/mail/maps/* . X X# Unshar them X/usr/local/bin/unshar [0-9]* >/dev/null X X# Zap the originals, and any shar messages Xrm -f [0-9]* s.log s.tmp X X# Compress the maps X/usr/lib/news/compress * X X# Move everyone to the Maps directory, replacing as needed Xmv * .. X X# Zap the temporary directory Xcd /usr/u/Maps Xrmdir /usr/u/Maps/tmp X X# now create the new paths file X# /usr/local/bin/pathalias -f * | /usr/local/bin/pathproc >newpaths X# cp newpaths /usr/lib/uucp Xexit 0 END_OF_xmaps if test 1146 -ne `wc -c , | BUT some animals are MORE equal or , | than others." a warning from or | "Animal Farm" by George Orwell