2000-12-13 02:08:15 +03:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
#
|
2000-12-14 04:41:57 +03:00
|
|
|
# /u/sonmi/bin/set_environment
|
2000-12-13 02:08:15 +03:00
|
|
|
#
|
|
|
|
# sourced from the header if running from cron to get the full environment
|
2001-02-21 00:55:47 +03:00
|
|
|
# to run nssqa - also used to unify all nssqa environments
|
2000-12-13 02:08:15 +03:00
|
|
|
#
|
|
|
|
# This is derived from the .cshrc file for the svbld account.
|
|
|
|
#
|
|
|
|
########################################################################
|
|
|
|
|
|
|
|
if [ -z "$HOME" ]
|
|
|
|
then
|
2001-02-21 00:55:47 +03:00
|
|
|
HOME=/u/svbld
|
2000-12-13 02:08:15 +03:00
|
|
|
fi
|
|
|
|
if [ -z "$QASCRIPT_DIR" ]
|
|
|
|
then
|
|
|
|
QASCRIPT_DIR=`dirname $0`
|
|
|
|
fi
|
|
|
|
|
2001-05-24 03:43:00 +04:00
|
|
|
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
|
2001-10-10 05:12:42 +04:00
|
|
|
JAVA_HOME="D:/i386/jdk1.2.2"
|
2001-05-24 03:43:00 +04:00
|
|
|
fi
|
2000-12-13 02:08:15 +03:00
|
|
|
|
2001-05-24 03:15:58 +04:00
|
|
|
CVSROOT=:pserver:svbld@redcvs.red.iplanet.com:/m/src
|
2000-12-13 02:08:15 +03:00
|
|
|
|
|
|
|
os_name=`uname -s`
|
|
|
|
os_version=`uname -r`
|
2001-12-04 02:00:02 +03:00
|
|
|
#os_p=`uname -p`
|
2000-12-13 02:08:15 +03:00
|
|
|
os_full=""
|
|
|
|
|
|
|
|
if [ -f /u/svbld/bin/nsarch ]
|
|
|
|
then
|
2001-02-21 00:55:47 +03:00
|
|
|
os_full=`/u/svbld/bin/nsarch -f` #FIXME
|
2000-12-13 02:08:15 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
MANPATH=/usr/share/man:/usr/openwin/man:/usr/local/man
|
|
|
|
|
2001-04-12 00:07:04 +04:00
|
|
|
RMAIL=rmail
|
2001-04-14 01:42:18 +04:00
|
|
|
BEFORE_CONTEXT_GREP=""
|
|
|
|
AFTER_CONTEXT_GREP=""
|
2001-04-12 00:07:04 +04:00
|
|
|
|
2000-12-13 02:08:15 +03:00
|
|
|
export CVSROOT HOME os_name os_version os_full MANPATH
|
|
|
|
|
|
|
|
|
2001-06-08 05:51:59 +04:00
|
|
|
if [ "$os_name" = "HP-UX" ]
|
2000-12-13 02:08:15 +03:00
|
|
|
then
|
2001-09-11 01:27:13 +04:00
|
|
|
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
|
2001-10-10 05:12:42 +04:00
|
|
|
JAVA_HOME="/share/builds/components/cms_jdk/HP-UX/1.2.2.04"
|
2001-11-20 04:06:41 +03:00
|
|
|
# JAVA_HOME="/share/builds/components/cms_jdk/HP-UX/1.3.0.00"
|
2001-06-08 05:51:59 +04:00
|
|
|
elif [ "$os_name" = "SunOS" ]
|
2000-12-13 02:08:15 +03:00
|
|
|
then
|
2001-10-10 05:12:42 +04:00
|
|
|
NATIVE_FLAG="-native"
|
2001-02-21 00:55:47 +03:00
|
|
|
XAPPLRESDIR=/usr/openwin/lib/app-defaults:/usr/local/lib/X11/app-defaults
|
|
|
|
OPENWINHOME=/usr/openwin
|
|
|
|
LD_LIBRARY_PATH=$OPENWINHOME/lib
|
2001-07-26 01:08:06 +04:00
|
|
|
if [ "$os_full" = "SOLARISx86 2.8" -o "$os_full" = "SOLARISx86 2.9" ]
|
|
|
|
then
|
2001-11-20 04:06:41 +03:00
|
|
|
#PATH=/usr/ucb:/opt/usr/local/bin:$PATH
|
2001-10-10 21:14:31 +04:00
|
|
|
JAVA_HOME="/usr/java1.2"
|
2001-11-20 04:06:41 +03:00
|
|
|
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"
|
2001-06-01 04:18:57 +04:00
|
|
|
else
|
2001-09-08 01:27:17 +04:00
|
|
|
PATH=/usr/ucb:$PATH
|
2001-10-10 21:14:31 +04:00
|
|
|
JAVA_HOME="/share/builds/components/jdk/1.2.2/SunOS"
|
2001-11-20 04:06:41 +03:00
|
|
|
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
|
2001-02-21 00:55:47 +03:00
|
|
|
export XAPPLRESDIR OPENWINHOME LD_LIBRARY_PATH
|
2001-10-10 05:12:42 +04:00
|
|
|
|
2001-06-08 05:51:59 +04:00
|
|
|
elif [ "$os_name" = "IRIX" ]
|
2000-12-13 02:08:15 +03:00
|
|
|
then
|
2001-02-21 00:55:47 +03:00
|
|
|
PATH=$PATH:/tools/ns/bin:/usr/local/bin:/etc:/usr/bsd
|
|
|
|
MANPATH=/tools/ns/man:/usr/local/man
|
2001-10-10 05:12:42 +04:00
|
|
|
JAVA_HOME="/share/builds/components/jdk/1.2.2/IRIX"
|
2001-06-08 05:51:59 +04:00
|
|
|
elif [ "$os_name" = "IRIX64" ]
|
2000-12-13 02:08:15 +03:00
|
|
|
then
|
2001-02-21 00:55:47 +03:00
|
|
|
PATH=$PATH:/tools/ns/bin:/usr/local/bin:/etc:/usr/bsd
|
|
|
|
MANPATH=/tools/ns/man:/usr/local/man
|
2001-10-10 05:12:42 +04:00
|
|
|
JAVA_HOME="/share/builds/components/jdk/1.2.2/IRIX"
|
2001-06-08 05:51:59 +04:00
|
|
|
elif [ "$os_name" = "Linux" ]
|
2000-12-13 02:08:15 +03:00
|
|
|
then
|
2001-02-21 00:55:47 +03:00
|
|
|
PATH=/lib:/usr/lib:/bin:/sbin:/usr/bin:/usr/sbin:$PATH
|
2001-04-12 00:07:04 +04:00
|
|
|
RMAIL=sendmail
|
2001-04-14 01:42:18 +04:00
|
|
|
#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"
|
2001-10-10 05:12:42 +04:00
|
|
|
JAVA_HOME="/share/builds/components/jdk/1.2.2/Linux"
|
2001-06-08 05:51:59 +04:00
|
|
|
elif [ "$os_name" = "AIX" ]
|
2000-12-13 02:08:15 +03:00
|
|
|
then
|
2001-02-21 00:55:47 +03:00
|
|
|
PATH=$PATH:/tools/contrib/bin:/usr/local/bin
|
|
|
|
TERM=vt100
|
|
|
|
export TERM
|
2001-10-10 05:12:42 +04:00
|
|
|
JAVA_HOME="/share/builds/components/cms_jdk/AIX/1.3.0"
|
2001-06-08 05:51:59 +04:00
|
|
|
elif [ "$os_name" = "OSF1" ]
|
2000-12-13 02:08:15 +03:00
|
|
|
then
|
2001-09-08 01:27:17 +04:00
|
|
|
PATH=$PATH:/usr/local/bin
|
2001-10-10 05:12:42 +04:00
|
|
|
JAVA_HOME="/share/builds/components/jdk/1.2.2/OSF1"
|
2000-12-13 02:08:15 +03:00
|
|
|
fi
|
|
|
|
|
2001-09-08 01:27:17 +04:00
|
|
|
if [ "$os_name" = "IRIX" ]
|
2000-12-13 02:08:15 +03:00
|
|
|
then
|
2001-02-21 00:55:47 +03:00
|
|
|
PATH=/tools/ns-arch/soft/perl-5.004_04/run/default/mips_sgi_irix5.3/bin:$PATH
|
2000-12-13 02:08:15 +03:00
|
|
|
elif [ "$os_name" = "IRIX64" ]
|
|
|
|
then
|
2001-02-21 00:55:47 +03:00
|
|
|
PATH=/tools/ns-arch/soft/perl-5.004_04/run/default/mips_sgi_irix5.3/bin:$PATH
|
2000-12-13 02:08:15 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
O_CYGNUS=OFF
|
|
|
|
O_MKS=OFF
|
|
|
|
O_WIN=OFF
|
|
|
|
|
|
|
|
if [ "$os_name" = "CYGWIN_NT-4.0" -o \
|
2001-02-21 00:55:47 +03:00
|
|
|
"$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"`
|
2001-03-28 04:04:37 +04:00
|
|
|
RSH=/cygdrive/c/winnt/system32/rsh
|
2000-12-13 02:08:15 +03:00
|
|
|
elif [ "$os_name" = "Windows_95" -o \
|
2001-02-21 00:55:47 +03:00
|
|
|
"$os_name" = "Windows_NT" -o \
|
|
|
|
"$os_name" = "WINNT" -o \
|
2001-03-28 04:04:37 +04:00
|
|
|
"$os_name" = "Windows" -o \
|
2001-02-21 00:55:47 +03:00
|
|
|
"$os_name" = "Windows_98" ]
|
|
|
|
then
|
|
|
|
#FIXME net use, mount the neccessary pnetwork drives and partitiones first
|
2001-06-12 05:26:13 +04:00
|
|
|
PATH=`echo $SHELL | sed -e "s/.[kK][sS][Hh].[Ee][Xx][Ee]//g" \
|
|
|
|
-e "s/.[sS][Hh].[Ee][Xx][Ee]//g"`
|
2001-05-25 05:46:08 +04:00
|
|
|
MOZTOOLS_IN_PATH=NO
|
2001-06-08 05:51:59 +04:00
|
|
|
if [ -n "$MOZ_TOOLS" -a -d "$MOZ_TOOLS" ] ; then
|
2001-05-25 05:46:08 +04:00
|
|
|
MOZ_TOOLS=`ls -d "$MOZ_TOOLS" | sed -e 's/\\\/\//g'`
|
|
|
|
#echo "MOZ_TOOLS reformated to $MOZ_TOOLS"
|
2001-06-08 05:51:59 +04:00
|
|
|
if [ -d "$MOZ_TOOLS" ] ; then #still exist after reformating?
|
2001-05-25 05:46:08 +04:00
|
|
|
MOZTOOLS_IN_PATH=OK
|
|
|
|
fi
|
|
|
|
fi
|
2001-06-08 05:51:59 +04:00
|
|
|
if [ -n "$MOZTOOLS_IN_PATH" -a "$MOZTOOLS_IN_PATH" = "OK" ] ; then
|
2001-05-25 05:46:08 +04:00
|
|
|
#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
|
2001-02-21 00:55:47 +03:00
|
|
|
|
|
|
|
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
|
2001-08-21 00:50:17 +04:00
|
|
|
if [ -z $RSH ] ; then
|
|
|
|
RSH=c:/winnt/system32/rsh
|
|
|
|
fi
|
2001-02-21 00:55:47 +03:00
|
|
|
|
2000-12-13 02:08:15 +03:00
|
|
|
else
|
2001-02-21 00:55:47 +03:00
|
|
|
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"`
|
2001-03-28 04:04:37 +04:00
|
|
|
RSH=rsh
|
2000-12-13 02:08:15 +03:00
|
|
|
fi
|
|
|
|
|
2001-02-21 00:55:47 +03:00
|
|
|
BASEPATH=$PATH # in case we we set and reset DIST directories the PATH
|
|
|
|
# needs to change accordingly
|
2001-09-08 01:27:17 +04:00
|
|
|
export PATH EDITOR EMACSLOADPATH PYTHONPATH PAGER XMCD_LIBDIR DISPLAY MANPATH os_full os_name BASEPATH RSH O_WIN
|
2000-12-13 02:08:15 +03:00
|
|
|
|
|
|
|
umask 022
|
|
|
|
|
2001-02-21 00:55:47 +03:00
|
|
|
system=`uname -n` # name of this system.
|
2000-12-13 02:08:15 +03:00
|
|
|
|
2001-10-10 05:12:42 +04:00
|
|
|
JAVAC=$JAVA_HOME/bin/javac
|
|
|
|
JAVA=$JAVA_HOME/bin/java
|
2001-11-20 04:06:41 +03:00
|
|
|
#JAVA=$JAVA_HOME/jre/bin/java
|
2001-10-10 05:12:42 +04:00
|
|
|
export JAVAC JAVA JAVA_HOME
|
|
|
|
|