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

Revision 24479, 931 bytes checked in by jdreed, 14 years ago (diff)
RevLine 
[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]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
[316]19
[24479]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
[316]37else
[24479]38    maybe_echo "  Creating .meetings file:"
39    cat >~/.meetings << _EOF_
[11295]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:
[316]42_EOF_
[24479]43    maybe_echo "  done."
44fi
Note: See TracBrowser for help on using the repository browser.