Initial add of defaria.com
[clearscm.git] / defaria.com / GD / rc / multisite
1 #!/bin/bash
2 ################################################################################
3 #
4 # File:         $RCSfile: multisite,v $
5 # Revision:     $Revision: 1.4 $ 
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: 2005/12/30 08:36:46 $
12 # Language:     bash
13 #
14 # (c) Copyright 2000-2005, Andrew@DeFaria.com, all rights reserved.
15 #
16 ################################################################################
17 if [ $ARCH = "cygwin" ]; then
18   export MSHOME=${MSHOME:-"$SYSTEMDRIVE/Program Files/Rational/ClearCase"}
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 CCHOME=${CCHOME:-"$SYSTEMDRIVE/Program Files/Rational/Multisite"}
32   export CLEARCASE_BLD_HOST_TYPE=Windows
33   export SLOGS=$LOGS/sync_logs
34   export SB="$CCHOME/var/shipping/ms_ship"
35 fi
36
37 function mt {
38   if [ -x "$MULTITOOL" ]; then
39     "$MULTITOOL" "$@"
40   else
41     echo "MultiSite is not installed on this system!"
42   fi
43 } # mt
44
45 function lspacket {
46   "$MULTITOOL" lspacket "$@"
47 } # lspacket
48
49 function llpacket {
50   "$MULTITOOL" lspacket -long "$@"
51 } # llpacket
52
53 function lsreplica {
54   "$MULTITOOL" lsreplica -invob "$@"
55 } # lsreplica
56
57 function llreplica {
58   "$MULTITOOL" lsreplica -long -invob "$@"
59 } # llreplica
60
61 function lsepoch {
62   "$MULTITOOL" lsepoch -invob "$@"
63 } # lsepoch
64
65 function llepoch {
66   "$MULTITOOL" lsepoch -long -invob "$@"
67 } # llepoch
68
69 function chepoch {
70   "$MULTITOOL" chepoch -invob "$@"
71 } # chepoch
72
73 function shipping_server {
74   $MSHOME/etc/shipping_server "$@"
75 } # shipping_server
76
77 function mkorder {
78   $MSHOME/etc/mkorder "$@"
79 } # mkorder
80
81 function syncreplica {
82   "$MULTITOOL" syncreplica "$@"
83 } # syncreplica