Initial add of defaria.com
[clearscm.git] / defaria.com / Computers / code / adm / bin / setup.unix
1 #!/bin/bash
2 ################################################################################
3 #
4 # File:         setup
5 # RCS:          $Header: setup,v 1.2 99/02/15 20:35:58 root Exp $
6 # Description:  This script will setup the necessary links for the AppServer.
7 # Author:       Andrew DeFaria, California Language Labs
8 # Created:      Thu May 16 09:51:15 PDT 1996
9 # Modified:
10 # Language:     Korn Shell
11 #
12 # (c) Copyright 2001, Andrew@DeFaria.com, all rights reserved
13 #
14 ################################################################################
15 # First determine where/how the appserver is mounted on local machine
16 if [ -d "/net/bismol" ]; then
17   MOUNTPOINT=/net
18   export APPSERVER=bismol
19 elif [ -d "/net/hpclbis" ]; then
20   MOUNTPOINT=/net
21   export APPSERVER=hpclbis
22 elif [ -d "/nfs/bismol" ]; then
23   MOUNTPOINT=/nfs
24   export APPSERVER=bismol
25 elif [ -d "/nfs/hpclbis" ]; then
26   MOUNTPOINT=/nfs
27   export APPSERVER=hpclbis
28 fi
29
30 # Export APPROOT properly
31 export APPROOT=$MOUNTPOINT/$APPSERVER
32
33 function make_symlink {
34   if [ ! -h "$1" ]; then
35     ln -sf $APPROOT$1 $1
36   fi
37 } # make_symlink
38
39 make_symlink /etc/socks.conf
40 make_symlink /usr/lib/font
41 make_symlink /usr/local/lib/emacs
42 make_symlink /usr/local/etc/newsdomain
43 make_symlink /usr/local/hindsight_4.0
44
45 # Create ispell directory if not there already
46 mkdir -p /usr/local/lib/ispell
47
48 make_symlink /usr/local/lib/ispell/english.hash
49
50 # Create import directory if not there already.
51 mkdir -p /usr/vue/config/import
52
53 # Special symlink
54 ln -sf $APPROOT/usr/vue/config/export/tools /usr/vue/config/import/tools
55 ln -s /app/mh /usr/local/bin/mh
56 ln -s /app/mh-lib /usr/local/lib/mh
57
58 # Xsession stuff
59
60 # Check that Xsession is indeed a link
61 if [ -f /usr/vue/config/Xsession ]; then
62   if [ ! -h /usr/vue/config/Xsession ]; then
63     mv /usr/vue/config/Xsession /usr/vue/config/Xsession.old
64     ln -sf $APPROOT/usr/vue/config/export/Xsession /usr/vue/config/Xsession
65   fi
66 fi
67
68 # Turned off as per Mark Keil's request
69 #if [ ! -h /usr/softbench ]; then
70 #  ln -sf $APPROOT/aspirin/softbench /usr/softbench
71 #fi
72
73 # Fix ups for SURF
74 mkdir -p /opt/surf
75 make_symlink /opt/surf/newconfig