Revision control

Line Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
#! /bin/sh

########################################################################
#
# /u/sonmi/bin/set_environment
#
# sourced from the header if running from cron to get the full environment
# to run nssqa    - also used to unify all nssqa environments
#
# This is derived from the .cshrc file for the svbld account.  
#
########################################################################

if [ -z "$HOME" ] 
then
    HOME=/u/svbld
fi
if [ -z "$QASCRIPT_DIR" ]
then
    QASCRIPT_DIR=`dirname $0`
fi

os_name=`uname -s`
if [ "$os_name" != "Windows_95" -a \
    "$os_name" != "Windows_NT" -a \
    "$os_name" != "WINNT" -a \
    "$os_name" != "Windows" -a \
    "$os_name" != "Windows_98" -a \
    "$os_name" != "CYGWIN_NT-4.0" -a \
    "$os_name" != "CYGWIN_NT-5.0" -a \
    "$os_name" != "CYGWIN_95-4.0" -a \
    "$os_name" != "CYGWIN_98-4.10" ]
then
    PATH=.:$HOME/bin:/tools/ns/bin:/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/dist/local/exe:/usr/bin/X11:/usr/audio/bin:/u/sonmi/bin:$PATH
    JAVA_HOME="D:/i386/jdk1.2.2"
    JAVA_HOME14="R:/jdk/1.4.0/WINNT"
fi

CVSROOT=:pserver:svbld@redcvs.red.iplanet.com:/m/src

os_name=`uname -s`
os_version=`uname -r`
#os_p=`uname -p`
os_full=""

if [ -f /u/svbld/bin/nsarch  ]
then
    os_full=`/u/svbld/bin/nsarch -f`    #FIXME
fi

MANPATH=/usr/share/man:/usr/openwin/man:/usr/local/man

RMAIL=rmail
BEFORE_CONTEXT_GREP=""
AFTER_CONTEXT_GREP=""

export CVSROOT HOME os_name os_version os_full MANPATH


if [ "$os_name" = "HP-UX" ]
then
    PATH=$PATH:/usr/local/bin:/opt/aCC/bin:/usr/local/bin/audio:/tools/ns/bin:/etc:/usr/contrib/bin:/usr/contrib/bin/X11:/usr/local/hpux/bin:/nfs/iapp1/hphome/bin:/etc:/u/svbld/bin/HP/perl/bin
    JAVA_HOME="/share/builds/components/cms_jdk/HP-UX/1.2.2.04"
    JAVA_HOME14=$JAVA_HOME
#    JAVA_HOME="/share/builds/components/cms_jdk/HP-UX/1.3.0.00"
elif [ "$os_name" = "SunOS" ]
then
    NATIVE_FLAG="-native"
    XAPPLRESDIR=/usr/openwin/lib/app-defaults:/usr/local/lib/X11/app-defaults
    OPENWINHOME=/usr/openwin
    LD_LIBRARY_PATH=$OPENWINHOME/lib
    if [ "$os_full" = "SOLARISx86 2.8" -o "$os_full" = "SOLARISx86 2.9" ] 
    then
        #PATH=/usr/ucb:/opt/usr/local/bin:$PATH
        JAVA_HOME="/usr/java1.2"
	JAVA_HOME14=/share/builds/components/jdk/1.4.0/SunOS_x86
        PATH=".:/usr/dist/share/forte_dev_i386,v6.2/SUNWspro/bin:/opt/usr/local/perl5/bin:/opt/SUNWspro/bin:/opt/usr/local/bin:/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/dist/local/exe:/usr/ccs/bin:/usr/ucb/bin:/usr/ucb:/opt/SUNWwabi/bin:/usr/local/bin:/tools/ns/bin:/etc:/tools/contrib/bin"
    else
        PATH=/usr/ucb:$PATH
        JAVA_HOME="/share/builds/components/jdk/1.2.2/SunOS"
	JAVA_HOME14=/share/builds/components/jdk/1.4.0/SunOS64
        PATH=/tools/ns/bin:$PATH:/opt/SUNWspro/bin:/usr/bin/X11:/usr/openwin/bin:/usr/openwin/demo
    
        if [ "$os_version" = "5.8" -o "$os_version" = "5.7" -o \
             "$os_version" = "5.9" ]
        then
            PATH=$PATH:/usr/dist/pkgs/forte_dev,v6.2/SUNWspro/bin:/tools/ns/workshop/bin
        else
            PATH=$PATH:/usr/dist/share/devpro,v5.0/5.x-sparc/bin:/tools/ns/workshop/bin
        fi
        PATH=$PATH:/usr/ccs/bin:/usr/ucb/bin:/opt/SUNWwabi/bin:/usr/local/bin:/tools/ns/bin:/etc:/tools/contrib/bin
     fi
    export XAPPLRESDIR  OPENWINHOME LD_LIBRARY_PATH

elif [ "$os_name" = "IRIX" ]
then
    PATH=$PATH:/tools/ns/bin:/usr/local/bin:/etc:/usr/bsd
    MANPATH=/tools/ns/man:/usr/local/man
    JAVA_HOME="/share/builds/components/jdk/1.2.2/IRIX"
    JAVA_HOME14=$JAVA_HOME
elif [ "$os_name" = "IRIX64" ]
then
    PATH=$PATH:/tools/ns/bin:/usr/local/bin:/etc:/usr/bsd
    MANPATH=/tools/ns/man:/usr/local/man
    JAVA_HOME="/share/builds/components/jdk/1.2.2/IRIX"
    JAVA_HOME14=$JAVA_HOME
elif [ "$os_name" = "Linux" ]
then
    PATH=/lib:/usr/lib:/bin:/sbin:/usr/bin:/usr/sbin:$PATH
    RMAIL=sendmail
    #the gnu grep, on Linux can output 10 lines above and 3 lines below 
    #the errormessage
    BEFORE_CONTEXT_GREP="--before-context=10"
    AFTER_CONTEXT_GREP="--after-context=3"
    JAVA_HOME="/share/builds/components/jdk/1.2.2/Linux"
    JAVA_HOME14=/share/builds/components/jdk/1.4.0/Linux
elif [ "$os_name" = "AIX" ]
then
    PATH=$PATH:/tools/contrib/bin:/usr/local/bin 
    TERM=vt100
    export TERM
    JAVA_HOME="/share/builds/components/cms_jdk/AIX/1.3.0"
    JAVA_HOME14=$JAVA_HOME
elif [ "$os_name" = "OSF1" ]
then
    PATH=$PATH:/usr/local/bin
    JAVA_HOME="/share/builds/components/jdk/1.2.2/OSF1"
    JAVA_HOME14=$JAVA_HOME
fi

if [ "$os_name" = "IRIX" ]
then
    PATH=/tools/ns-arch/soft/perl-5.004_04/run/default/mips_sgi_irix5.3/bin:$PATH
elif [ "$os_name" = "IRIX64" ]
then
    PATH=/tools/ns-arch/soft/perl-5.004_04/run/default/mips_sgi_irix5.3/bin:$PATH
fi

O_CYGNUS=OFF
O_MKS=OFF
O_WIN=OFF

if [ "$os_name" = "CYGWIN_NT-4.0" -o \
    "$os_name" = "CYGWIN_NT-5.0" -o \
    "$os_name" = "CYGWIN_95-4.0" -o \
    "$os_name" = "CYGWIN_98-4.10" ]
then
    #FIXME net use, mount the neccessary pnetwork drives and partitiones first
    #FIXME - take MKS out of the PATH
    os_full=$os_name
    os_name="Windows"
    O_CYGNUS=ON
    O_WIN=ON
    PATH="`dirname $0`:.:/cygdrive/c/cygwin/bin:/cygdrive/z/nstools/bin:/cygdrive/z/nstools/perl5:/cygdrive/z/bin:/cygdrive/c/WINNT/System32:/cygdrive/c/WINNT"
    RM=/cygdrive/c/cygwin/bin/rm.exe    #FIXME - in case we cant cporrect 
                                        #these with the PATH alone
    PATH=`perl $QASCRIPT_DIR/path_uniq "$PATH"`
    RSH=/cygdrive/c/winnt/system32/rsh
elif [ "$os_name" = "Windows_95" -o \
    "$os_name" = "Windows_NT" -o \
    "$os_name" = "WINNT" -o \
    "$os_name" = "Windows" -o \
    "$os_name" = "Windows_98" ]
then
    #FIXME net use, mount the neccessary pnetwork drives and partitiones first
    PATH=`echo $SHELL | sed -e "s/.[kK][sS][Hh].[Ee][Xx][Ee]//g"  \
				-e "s/.[sS][Hh].[Ee][Xx][Ee]//g"`
    MOZTOOLS_IN_PATH=NO
    if [ -n "$MOZ_TOOLS" -a -d  "$MOZ_TOOLS" ] ; then
        MOZ_TOOLS=`ls -d "$MOZ_TOOLS" | sed -e 's/\\\/\//g'`
        #echo "MOZ_TOOLS reformated to $MOZ_TOOLS"
        if [ -d "$MOZ_TOOLS" ] ; then #still exist after reformating?
            MOZTOOLS_IN_PATH=OK
        fi
    fi
    if [ -n "$MOZTOOLS_IN_PATH" -a "$MOZTOOLS_IN_PATH" = "OK" ] ; then
        #echo "Use MOZTOOLS in PATH"
        PATH="$MOZ_TOOLS/bin;$MOZ_TOOLS/perl5;$PATH"
    elif [ -d Z:/nstools/bin ] ; then
        PATH="Z:/nstools/bin;Z:/nstools/perl5;$PATH"
    elif [ -d C:/nstools/bin ] ; then
        PATH="C:/nstools/bin;C:/nstools/perl5;$PATH"
    elif [ -d D:/nstools/bin ] ; then
        PATH="D:/nstools/bin;D:/nstools/perl5;$PATH"
    elif [ -d D:/i386/nstools/bin ] ; then
        PATH="D:/i386/nstools/bin;D:/i386/nstools/perl5;$PATH"
    else
        echo "FATAL: Can't find nstools"
        exit
    fi

    if [  "$os_name" = "Windows_NT" -o \
        "$os_name" = "WINNT" ]
    then
        PATH="${PATH};C:/WINNT/System32;C:/WINNT;.;"
    fi
    PATH="`dirname $0`;$PATH"
    
    PATH=`perl $QASCRIPT_DIR/path_uniq -d ';' "$PATH"`
    echo $PATH
    os_full=$os_name
    os_name="Windows"
    O_MKS=ON
    O_WIN=ON
    if [ -z $RSH ] ; then 
        RSH=c:/winnt/system32/rsh
    fi
    
else
    EDITOR=vi
    EMACSLOADPATH=/u/svbld/emacs
    PYTHONPATH=.:/tools/ns/lib/python1.4
    PAGER=less
    XMCD_LIBDIR=/usr/local/lib/xmcd
    DISPLAY=:0.0
    PATH=`perl $QASCRIPT_DIR/path_uniq "$PATH"`
    RSH=rsh
fi

BASEPATH=$PATH    # in  case we we set and reset DIST directories the PATH 
                # needs to change accordingly
export PATH EDITOR EMACSLOADPATH PYTHONPATH PAGER XMCD_LIBDIR DISPLAY MANPATH os_full os_name BASEPATH RSH O_WIN

umask 022

system=`uname -n`        # name of this system.

JAVAC=$JAVA_HOME/bin/javac
JAVA=$JAVA_HOME/bin/java
JAVAC14=$JAVA_HOME14/bin/javac
JAVA14=$JAVA_HOME14/bin/java
#JAVA=$JAVA_HOME/jre/bin/java
export JAVAC JAVA JAVA_HOME JAVAC14 JAVA_HOME14 JAVA14