|
|
1.1 ! root 1: case $CONFIG in ! 2: '') . config.sh ;; ! 3: esac ! 4: echo "Extracting newsetup (with variable substitutions)" ! 5: $spitshell >newsetup <<!GROK!THIS! ! 6: $startsh ! 7: # $Header: newsetup.SH,v 4.3.1.2 86/09/05 15:41:04 lwall Exp $ ! 8: # ! 9: # $Log: newsetup.SH,v $ ! 10: # Revision 4.3.1.2 86/09/05 15:41:04 lwall ! 11: # Changes for newsgroup renaming. ! 12: # ! 13: # Revision 4.3.1.1 85/05/10 11:35:43 lwall ! 14: # Branch for patches. ! 15: # ! 16: # Revision 4.3 85/05/01 11:43:05 lwall ! 17: # Baseline for release with 4.3bsd. ! 18: # ! 19: ! 20: export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh \$0; kill \$\$) ! 21: ! 22: : syntax: newsetup ! 23: ! 24: : System dependencies ! 25: : You will want to change the definitions below to reflect the distribution ! 26: : areas around you. If you have more areas than this you will need to modify ! 27: : the sed below. ! 28: ! 29: locorg="$locpref" ! 30: organization="$orgpref" ! 31: city="$citypref" ! 32: state="$statepref" ! 33: cntry="$cntrypref" ! 34: cont="$contpref" ! 35: active="${active-/usr/lib/news/active}" ! 36: ! 37: dotdir="\${DOTDIR-\${HOME-\$LOGDIR}}" ! 38: $rm -f \$dotdir/.oldnewsrc ! 39: $echo "Creating .newsrc in \$dotdir to be used by news programs." ! 40: ! 41: case \$active in ! 42: ~*) active=\`$filexp \$active\` ;; ! 43: esac ! 44: ! 45: : NOTE: SED WILL NOT TAKE MORE THAN 10 WFILES, SO BEWARE ! 46: ! 47: $sort <\$active | $sed >/tmp/n.tmp\$\$ \\ ! 48: -e 's/^\([^ ]*\) .*\$/\1:/' \\ ! 49: -e '/^control:/{' \\ ! 50: -e " w /tmp/n.test\$\$" \\ ! 51: -e ' d' \\ ! 52: -e '}' \\ ! 53: -e '/^junk:/{' \\ ! 54: -e " w /tmp/n.test\$\$" \\ ! 55: -e ' d' \\ ! 56: -e '}' \\ ! 57: -e '/test:/{' \\ ! 58: -e " w /tmp/n.test\$\$" \\ ! 59: -e ' d' \\ ! 60: -e '}' \\ ! 61: -e "/^net\./{" \\ ! 62: -e " w /tmp/n.net\$\$" \\ ! 63: -e ' d' \\ ! 64: -e '}' \\ ! 65: -e "/^mod\./{" \\ ! 66: -e " w /tmp/n.mod\$\$" \\ ! 67: -e ' d' \\ ! 68: -e '}' \\ ! 69: -e "/^\$locorg\./{" \\ ! 70: -e " w /tmp/n.\$locorg\$\$" \\ ! 71: -e ' d' \\ ! 72: -e '}' \\ ! 73: -e "/^\$organization\./{" \\ ! 74: -e " w /tmp/n.\$organization\$\$" \\ ! 75: -e ' d' \\ ! 76: -e '}' \\ ! 77: -e "/^\$city\./{" \\ ! 78: -e " w /tmp/n.\$city\$\$" \\ ! 79: -e ' d' \\ ! 80: -e '}' \\ ! 81: -e "/^\$state\./{" \\ ! 82: -e " w /tmp/n.\$state\$\$" \\ ! 83: -e ' d' \\ ! 84: -e '}' \\ ! 85: -e "/^fa\./{" \\ ! 86: -e " w /tmp/n.fa\$\$" \\ ! 87: -e ' d' \\ ! 88: -e '}' ! 89: ! 90: $sed </tmp/n.tmp\$\$ >/tmp/n.local\$\$ \\ ! 91: -e "/^\$cntry\./{" \\ ! 92: -e " w /tmp/n.\$cntry\$\$" \\ ! 93: -e ' d' \\ ! 94: -e '}' \\ ! 95: -e "/^\$cont\./{" \\ ! 96: -e " w /tmp/n.\$cont\$\$" \\ ! 97: -e ' d' \\ ! 98: -e '}' \\ ! 99: -e "/^to\./{" \\ ! 100: -e " w /tmp/n.to\$\$" \\ ! 101: -e ' d' \\ ! 102: -e '}' \\ ! 103: -e "/^comp\./{" \\ ! 104: -e " w /tmp/n.comp\$\$" \\ ! 105: -e ' d' \\ ! 106: -e '}' \\ ! 107: -e "/^news\./{" \\ ! 108: -e " w /tmp/n.news\$\$" \\ ! 109: -e ' d' \\ ! 110: -e '}' \\ ! 111: -e "/^rec\./{" \\ ! 112: -e " w /tmp/n.rec\$\$" \\ ! 113: -e ' d' \\ ! 114: -e '}' \\ ! 115: -e "/^sci\./{" \\ ! 116: -e " w /tmp/n.sci\$\$" \\ ! 117: -e ' d' \\ ! 118: -e '}' \\ ! 119: -e "/^soc\./{" \\ ! 120: -e " w /tmp/n.soc\$\$" \\ ! 121: -e ' d' \\ ! 122: -e '}' \\ ! 123: -e "/^talk\./{" \\ ! 124: -e " w /tmp/n.talk\$\$" \\ ! 125: -e ' d' \\ ! 126: -e '}' \\ ! 127: -e "/\./{" \\ ! 128: -e " w /tmp/n.misc\$\$" \\ ! 129: -e ' d' \\ ! 130: -e '}' ! 131: ! 132: ! 133: if $test -s \$dotdir/.newsrc ; then ! 134: $echo "Saving your current .newsrc as .oldnewsrc..." ! 135: $mv -f \$dotdir/.newsrc \$dotdir/.oldnewsrc ! 136: fi ! 137: ! 138: : newsrc order determined here ! 139: $cat \\ ! 140: /tmp/n.local\$\$ \\ ! 141: /tmp/n.\$locorg\$\$ \\ ! 142: /tmp/n.\$organization\$\$ \\ ! 143: /tmp/n.\$city\$\$ \\ ! 144: /tmp/n.\$state\$\$ \\ ! 145: /tmp/n.\$cntry\$\$ \\ ! 146: /tmp/n.\$cont\$\$ \\ ! 147: /tmp/n.mod\$\$ \\ ! 148: /tmp/n.news\$\$ \\ ! 149: /tmp/n.comp\$\$ \\ ! 150: /tmp/n.sci\$\$ \\ ! 151: /tmp/n.rec\$\$ \\ ! 152: /tmp/n.soc\$\$ \\ ! 153: /tmp/n.misc\$\$ \\ ! 154: /tmp/n.talk\$\$ \\ ! 155: /tmp/n.net\$\$ \\ ! 156: /tmp/n.fa\$\$ \\ ! 157: /tmp/n.test\$\$ \\ ! 158: | $uniq >\$dotdir/.newsrc ! 159: ! 160: $rm -f /tmp/n.to\$\$ \\ ! 161: /tmp/n.tmp\$\$ \\ ! 162: /tmp/n.local\$\$ \\ ! 163: /tmp/n.\$locorg\$\$ \\ ! 164: /tmp/n.\$organization\$\$ \\ ! 165: /tmp/n.\$city\$\$ \\ ! 166: /tmp/n.\$state\$\$ \\ ! 167: /tmp/n.\$cntry\$\$ \\ ! 168: /tmp/n.\$cont\$\$ \\ ! 169: /tmp/n.mod\$\$ \\ ! 170: /tmp/n.news\$\$ \\ ! 171: /tmp/n.comp\$\$ \\ ! 172: /tmp/n.sci\$\$ \\ ! 173: /tmp/n.soc\$\$ \\ ! 174: /tmp/n.rec\$\$ \\ ! 175: /tmp/n.talk\$\$ \\ ! 176: /tmp/n.net\$\$ \\ ! 177: /tmp/n.fa\$\$ \\ ! 178: /tmp/n.misc\$\$ \\ ! 179: /tmp/n.test\$\$ ! 180: ! 181: $cat <<'EOH' ! 182: Done. ! 183: ! 184: If you have never used the news system before, you may find the articles ! 185: in mod.announce.newuser to be helpful. There is also a manual entry for rn. ! 186: ! 187: To get rid of newsgroups you aren't interested in, use the 'u' command. ! 188: Type h for help at any time while running rn. ! 189: EOH ! 190: !GROK!THIS! ! 191: $eunicefix newsetup ! 192: chmod 755 newsetup
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.