Removed /usr/local from CDPATH
[clearscm.git] / rc / multisite
1 #!/bin/bash
2 ################################################################################
3 #
4 # File:         $RCSfile: multisite,v $
5 # Revision:     $Revision: 1.6 $ 
6 # Description:  This script set up some useful environment variables and aliases
7 #               for MultiSite execution. File should be sourced (e.g . 
8 #               multisite)
9 # Author:       Andrew@DeFaria.com
10 # Created:      Wed Jun  5 21:08:03 PDT 1996
11 # Modified:     $Date: 2011/03/07 22:11:23 $
12 # Language:     bash
13 #
14 # (c) Copyright 2000-2005, Andrew@DeFaria.com, all rights reserved.
15 #
16 ################################################################################
17 if [ $ARCHITECTURE = "cygwin" ]; then
18   export MSHOME=$(cygpath -u "$(regtool get '/machine/SOFTWARE/Rational Software/RSINSTALLDIR' 2>/dev/null)" 2>/dev/null)
19 else 
20   export MSHOME=/opt/rational/clearcase/
21 fi
22
23 if [ ! -d "$MSHOME" ]; then
24   unset MSHOME
25   return
26 fi
27
28 export MULTITOOL="${MSHOME}bin/multitool"
29
30 if [ -x "$MULTITOOL" ]; then
31   export CLEARCASE_BLD_HOST_TYPE=Windows
32   export SLOGS=$LOGS/sync_logs
33
34   if [ $ARCHITECTURE = "cygwin" ]; then
35     export SB="${MSHOME}var/shipping/ms_ship"
36   else
37     export SB="/var/adm/rational/clearcase/shipping/ms_ship"
38   fi
39 fi
40
41 function mt {
42   if [ -x "$MULTITOOL" ]; then
43     "$MULTITOOL" "$@"
44   else
45     echo "MultiSite is not installed on this system!"
46   fi
47 } # mt
48
49 function lspacket {
50   "$MULTITOOL" lspacket "$@"
51 } # lspacket
52
53 function llpacket {
54   "$MULTITOOL" lspacket -long "$@"
55 } # llpacket
56
57 function lsreplica {
58   "$MULTITOOL" lsreplica -invob "$@"
59 } # lsreplica
60
61 function llreplica {
62   "$MULTITOOL" lsreplica -long -invob "$@"
63 } # llreplica
64
65 function lsepoch {
66   "$MULTITOOL" lsepoch -invob "$@"
67 } # lsepoch
68
69 function llepoch {
70   "$MULTITOOL" lsepoch -long -invob "$@"
71 } # llepoch
72
73 function chepoch {
74   "$MULTITOOL" chepoch -invob "$@"
75 } # chepoch
76
77 function shipping_server {
78   $MSHOME/etc/shipping_server "$@"
79 } # shipping_server
80
81 function mkorder {
82   $MSHOME/etc/mkorder "$@"
83 } # mkorder
84
85 function syncreplica {
86   "$MULTITOOL" syncreplica "$@"
87 } # syncreplica