Rev | Line | |
---|
[24479] | 1 | #!/bin/sh |
---|
[316] | 2 | # Set up a user for discuss. |
---|
| 3 | # Writing this in C is overkill. |
---|
[5563] | 4 | # True, but C-shell syntax is gross. |
---|
[24479] | 5 | # So we rewrite it in Bourne shell |
---|
[316] | 6 | |
---|
[24479] | 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 |
---|
[316] | 19 | |
---|
[24479] | 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 |
---|
[316] | 37 | else |
---|
[24479] | 38 | maybe_echo " Creating .meetings file:" |
---|
| 39 | cat >~/.meetings << _EOF_ |
---|
[11295] | 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: |
---|
[316] | 42 | _EOF_ |
---|
[24479] | 43 | maybe_echo " done." |
---|
| 44 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.