|
|
1.1 root 1: case $# in
2: 0)
3: ng=h
4: while $test "$ng" = h ; do
5: $echo ""
6: $echo $n "Newsgroup(s): $c"
7: read ng
8: case $ng in
9: h)
10: $cat <<'EOH'
11:
12: Type the name of one or more newsgroups to which you wish to post an article.
13: If you want to post to multiple newsgroups, it is better to do them all at
14: once than to post to each newsgroup individually, which defeats the news
15: reading programs' strategies of eliminating duplicates.
16:
17: Separate multiple newsgroup names with commas.
18: EOH
19: ;;
20: esac
21: done
22: ;;
23: *)
24: ng=$1
25: shift
26: ;;
27: esac
28: case $ng in
29: *\ *)
30: ng=`$echo "$ng" | $sed 's/[, ] */,/g'`
31: ;;
32: esac
33: case $ng in
34: net.*|fa.*|mod.*)
35: defdist=net
36: dist=h
37: ;;
38: *.*)
39: defdist=`expr "X$ng" : 'X\([a-z0-9]*\)'`
40: dist=h
41: ;;
42: *)
43: defdist=''
44: dist=''
45: ;;
46: esac
47:
48: while $test "$dist" = h ; do
49: if $test -f $lib/distributions; then
50: $echo " "
51: $echo "Your local distribution prefixes are:"
52: $cat $lib/distributions
53: else
54: $egrep -v '[ ]none$' <<EOM
55:
56: Your local distribution prefixes are:
57: Local organization: $loc
58: Organization: $org
59: City: $city
60: $stpr: $state
61: Country: $cntry
62: Continent: $cont
63: Everywhere: net,mod,fa
64:
65: EOM
66: fi
67: $echo $n "Distribution ($defdist): $c"
68: read dist
69: case $dist in
70: '') dist=$defdist ;;
71: esac
72: case $dist in
73: h)
74: $cat <<'EOH'
75:
76: The Distribution line may be used to limit the distribution of an article
77: to some subset of the systems that would receive the article based only on
78: the Newsgroups line. For example, if you want to sell your car in net.auto,
79: and you live in New Jersey, you might want to put "nj" on the Distribution
80: line to avoid advertising in California, which has enough problems of its own.
81: The actual area designators to use depend on where you are, of course.
82: EOH
83: ;;
84: ''|$loc*|$org*|$city*|$state*|$cntry*|$cont*|fa*|mod*)
85: ;;
86: net*|world*)
87: dist=''
88: ;;
89: *)
90: if $test -f $lib/distributions && \
91: $egrep "^$dist[ ]" $lib/distributions >$tmpart && \
92: $test -s $tmpart; then
93: : null
94: else
95: $echo "Unrecognized distribution prefix--type h for help."
96: dist=h
97: fi
98: ;;
99: esac
100: done
101:
102: case $ng in
103: *net.general*)
104: follow=`echo "$ng" | sed 's/net\.general/net.followup/g'`
105: ;;
106: *)
107: follow=""
108: ;;
109: esac
110:
111: case $# in
112: 0)
113: title=h
114: while $test "$title" = h ; do
115: $echo ""
116: $echo $n "Title/Subject: $c"
117: read title
118: case $title in
119: h)
120: $cat <<'EOH'
121:
122: Type the title for your article. Please make it as informative as possible
123: (within reason) so that people who aren't interested won't have to read the
124: article to find out they aren't interested. This includes marking movie
125: spoilers as (spoiler), and rotated jokes as (rot 13).
126: EOH
127: ;;
128: esac
129: done
130: ;;
131: *)
132: title="$*"
133: ;;
134: esac
135:
136: # now build a file with a header for them to edit
137:
138: set X ${USER-${LOGNAME-`who am i`}}
139: shift
140: logname=$1
141: case $logname in
142: *!*) logname=`expr "$logname" : '!\(.*\)$'` ;;
143: esac
144: case ${NAME-$nametype} in
145: bsd)
146: fullname=`$sed </etc/passwd -e "/^$logname:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:\([^,:;]*\).*"'$'"/\1/" -e "q" -e "}" -e "d"`
147: case $fullname in
148: *'&'*) : GACK
149: lname=`$echo $logname | $tr 'a-z' 'A-Z'`
150: lname=`$echo $lname $logname | $sed 's/^\(.\)[^ ]* ./\1/'`
151: fullname=`$echo "$fullname" | $sed "s/&/${lname}/"`
152: ;;
153: esac
154: ;;
155: usg)
156: fullname=`$sed </etc/passwd -e "/^$logname:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:\([^(:]*\).*"'$'"/\1/" -e "s/^.*-//" -e "q" -e "}" -e "d"`
157: ;;
158: *)
159: fullname=${NAME-`$cat ${HOME-$LOGDIR}/.fullname`}
160: ;;
161: esac
162:
163: orgname=${ORGANIZATION-$orgname}
164: case $orgname in
165: /*) orgname=`$cat $orgname` ;;
166: esac
167:
168: $cat > $tmpart <<EOHeader
169: From: $logname@$sitename ($fullname)
170: Path: $sitename!$logname
171: Newsgroups: $ng
172: Subject: $title
173: Expires:
174: References:
175: Sender:
176: Reply-To: $logname@$sitename ($fullname)
177: Followup-To: $follow
178: Distribution: $dist
179: Organization: $orgname
180: Keywords:
181:
182: EOHeader
183:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.