|
|
1.1 root 1: case $CONFIG in
2: '') . config.sh ;;
3: esac
4: echo "Extracting newsgroups (with variable substitutions)"
5: $spitshell >newsgroups <<!GROK!THIS!
6: $startsh
7: # $Header: newsgroups.SH,v 4.3 85/05/01 11:43:27 lwall Exp $
8: #
9: # $Log: newsgroups.SH,v $
10: # Revision 4.3 85/05/01 11:43:27 lwall
11: # Baseline for release with 4.3bsd.
12: #
13:
14: export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh \$0; kill \$\$)
15:
16: : syntax: newsgroups [pattern] [pipeflag]
17:
18: : System Dependencies
19:
20: : You might want to change pager to a "make column" program if you have one.
21: : On the other hand, if your kernel does paging, cat would probably do.
22: pager="${pager-/usr/ucb/more}"
23: active="${active-/usr/lib/news/active}"
24:
25: : End of system dependencies, hopefully
26:
27: case \$active in
28: ~*) active=\`$filexp \$active\` ;;
29: esac
30:
31: if $test \$# -ge 2 ; then
32: pager=$cat
33: else
34: $echo "Completely unsubscribed newsgroups:"
35: fi
36:
37: dotdir=\${DOTDIR-\${HOME-\$LOGDIR}}
38:
39: : Throwing .newsrc into the pot twice is a lovely hack to prevent
40: : bogus newsgroups from showing up as unsubscribed.
41:
42: $cat \$dotdir/.newsrc \$dotdir/.newsrc \$active | \\
43: $sed -e '/^options/d' \\
44: -e '/^[ ]/d' \\
45: -e '/^control/d' \\
46: -e '/^to\./d' \\
47: -e 's/^\([^ !:]*\)[ !:].*\$/\1/' \\
48: -e "/.*\$1/p" \\
49: -e 'd' | \\
50: $sort | $uniq -u | \$pager
51: if $test \$# -ge 2 ; then
52: exit
53: fi
54: $echo $n "[Type return to continue] $c"
55: read tmp
56: $echo ""
57: $echo "Unsubscribed but mentioned in .newsrc:"
58: $sed < \$dotdir/.newsrc \\
59: -e "/\$1.*!/"'s/^\([^!]*\)!.*\$/\1/p' \\
60: -e 'd' | \\
61: $sort | \$pager
62: !GROK!THIS!
63: $eunicefix newsgroups
64: chmod 755 newsgroups
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.