#!/bin/sh #----------------------------------------------------------------------- # # dofetch -- add some special processing to fetch # # Fetchnews normally works in an automatic manner, fetching # groups which have been recently requested by users. # # This shell script provides a bit more control over what is # fetched. It can either # 1. fetch groups in a pre-specified file # 2. fetch groups based on a particular user's .newsr file # 3. fetch groups on the command line # # License as per leafnode, share and enjoy! # Mark Harrison, markh@usai.asiainfo.com #----------------------------------------------------------------------- #----------------------------------------------------------------------- # First clean things up. This is not strictly necessary, but # it's convenient in many cases. #./texpire #----------------------------------------------------------------------- # 1. Hardcoded list. Put the newsgroups list, one per line, # in the file "my.interesting.newsgroups" groups=`cat my.interesting.newsgroups` #----------------------------------------------------------------------- # 2. Newsrc. Put the path to your own newsrc file below. # *** comment this out if you use method 1 *** groups=`grep : /home/markh/.newsrc|sed s/:.*//` #----------------------------------------------------------------------- # 3. Command line. If a list of newsgroups is given on the # command line, just fetch those newsgroups. if test $# -ne 0; then groups=$* echo fetching only groups: $groups fi #----------------------------------------------------------------------- # Now that we have the newsgroup list, zap entries in the # interesting.groups directory, repopulate the directory, # and fetch news as usual. rm -f /var/spool/news/interesting.groups/* for i in $groups;do touch /var/spool/news/interesting.groups/$i done /fetchnews -vvv