source: trunk/athena/bin/discuss/mclient/dsc_setup.sh @ 24479

Revision 24479, 931 bytes checked in by jdreed, 15 years ago (diff)
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
7case "$@" in
8    -q)
9        quiet=0
10        ;;
11    "")
12        quiet=1
13        ;;
14    *)
15        echo "Usage: $0 [-q]\n"
16        exit 1
17        ;;
18esac
19
20
21maybe_echo() {
22    if [ $quiet -eq 1 ]; then
23        echo "$@"
24    fi
25}
26
27if [ -f ~/.meetings ]; then
28    maybe_echo "  You appear to have a .meetings file; you don't need to run this."
29    exit 0
30fi
31
32if [ -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
37else
38    maybe_echo "  Creating .meetings file:"
39    cat >~/.meetings << _EOF_
400:0:0:charon.mit.edu:/var/spool/discuss/new_meetings:New_meetings,new_meetings:
410:0:0:charon.mit.edu:/var/spool/discuss/eve:Everybody,eve:
42_EOF_
43    maybe_echo "  done."
44fi
Note: See TracBrowser for help on using the repository browser.