The CERN and ROOT scripts provide the user with a way to automatically set up an environment condusive to the use of ROOT and CERN libraries of a specific version.
The scripts are setup_cern.sh and setup_root.sh and they are located in the /net/cern directory. Users can either call them directly, download them to a separate directory for customization or installed directly into the user's .bash_profile startup script.
The contents of the setup_cern.sh is as follows:
#!/bin/bash
#
# setup_cern.sh
#
# This script sets up environment variables for the
# CERN libraries, as well as a few common libs.
#
# Wyvern 04/29/02
CERNDIR=/net/cernlib
VERSION="pro"
CERNROOT=$CERNDIR/$VERSION
if test -d $CERNDIR; then
export CERN=$CERNDIR
fi
export HARDWARE="pclinux"
export hardware="pclinux"
if [ $CERN ]; then
if [ ! $(echo $PATH | grep $CERNROOT/bin) ] ; then
export PATH=$CERN/pro/bin:$PATH ; fi
if [ ! $(echo $LD_LIBRARY_PATH | grep $CERNROOT/lib) ] ; then
export LD_LIBRARY_PATH=$CERNROOT/lib:$LD_LIBRARY_PATH ; fi
export packlib=$CERNROOT/lib/libpacklib.a
export kernlib=$CERNROOT/lib/libkernlib.a
export mathlib=$CERNROOT/lib/libmathlib.a
export graflib=$CERNROOT/lib/libgraflib.a
fi
Simply change the VERSION variable to whichever version of the CERN libraries you want. Current versions are old(2000), pro(2000) and new(2002). The default is pro.
The contents of the setup_root.sh script is as follows:
#!/bin/bash
# setup_root.sh
#
# This script sets up certain environmental variables
# to use the ROOT software
#
# Wyvern April 29 2002
ROOTDIR=/net/cern
ROOTVER="root-3.05.07"
if test -d $ROOTDIR/$ROOTVER ; then
export ROOTSYS=$ROOTDIR/$ROOTVER
fi
if [ $ROOTSYS ]; then
if [ ! $(echo $PATH | grep $ROOTSYS/bin ) ] ; then
export PATH=$ROOTSYS/bin:$PATH ; fi
if [ ! $(echo $SHLIB_PATH | grep $ROOTSYS/lib ) ] ; then
export SHLIB_PATH=$ROOTSYS/lib:$SHLIB_PATH ; fi
if [ ! $(echo $LD_LIBRARY_PATH | grep $ROOTSYS/lib ) ] ; then
export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH; fi
fi
The default version is 3.05.07. Other versions available are root-3.01, root-3.05, root-3.05.07-dev, root-4.00, root-4.00.08 and root-4.02.00. Simply change the ROOTVER variable to match your preference.
|