Line | |
---|
1 | #!/bin/sh |
---|
2 | # Set up a user for discuss. |
---|
3 | # Writing this in C is overkill. |
---|
4 | # True, but C-shell syntax is gross. |
---|
5 | # So we rewrite it in Bourne shell |
---|
6 | |
---|
7 | case "$@" in |
---|
8 | -q) |
---|
9 | quiet=0 |
---|
10 | ;; |
---|
11 | "") |
---|
12 | quiet=1 |
---|
13 | ;; |
---|
14 | *) |
---|
15 | echo "Usage: $0 [-q]\n" |
---|
16 | exit 1 |
---|
17 | ;; |
---|
18 | esac |
---|
19 | |
---|
20 | |
---|
21 | maybe_echo() { |
---|
22 | if [ $quiet -eq 1 ]; then |
---|
23 | echo "$@" |
---|
24 | fi |
---|
25 | } |
---|
26 | |
---|
27 | if [ -f ~/.meetings ]; then |
---|
28 | maybe_echo " You appear to have a .meetings file; you don't need to run this." |
---|
29 | exit 0 |
---|
30 | fi |
---|
31 | |
---|
32 | if [ -f ~/.disrc ]; then |
---|
33 | maybe_echo " You appear to have a .disrc file left over from the experimental" |
---|
34 | maybe_echo " version of discuss." |
---|
35 | maybe_echo " Converting your .disrc file to a .meetings file:" |
---|
36 | disrc2meetings |
---|
37 | else |
---|
38 | maybe_echo " Creating .meetings file:" |
---|
39 | cat >~/.meetings << _EOF_ |
---|
40 | 0:0:0:charon.mit.edu:/var/spool/discuss/new_meetings:New_meetings,new_meetings: |
---|
41 | 0:0:0:charon.mit.edu:/var/spool/discuss/eve:Everybody,eve: |
---|
42 | _EOF_ |
---|
43 | maybe_echo " done." |
---|
44 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.