BashSnippetForSoftware
NOTE, this is obsolete. Please refer to Accessing Linc Software page. If you are running bash as your default Unix or Linux Command-line Shell, this provides the code snippet to include in your .bash_profile so that you can access programs maintained by LINC.
LINC-BASH-PROFILE-ADD.txt
—
Plain Text,
3Kb
File contents
#LINC Related Statements
#The next two lines allows the use of ssh authentication when talking to the CVS server
CVS_RSH=ssh
export CVS_RSH
#Next, adding these lines to be able to access the Java Postgres Driver
if [ $CLASSPATH ]; then
CLASSPATH=/lincfs/software/independent/DB_Driver/Postgres_JDBC/postgres.jar:$CLASSPATH
else
CLASSPATH=/lincfs/software/independent/DB_Driver/Postgres_JDBC/postgres.jar
fi
export CLASSPATH
#Now, enabling the scons build tool
PATH=/lincfs/users/LINC/software/independent/scons/scons-1-1-0/bin:$PATH
#Okay - the rest of the sets is dependant on the OS and Platform - so, let's check those.
#first, let's get the main OS type
linctemp=`echo ``uname -s`
#If is is SunOS
if [ ${linctemp} == 'SunOS' ]; then
#get the version
if [ `echo `` uname -r ` == '5.10' ]; then
#if it is 5.10 (Solaris 10), then set these environment variables:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lincfs/users/LINC/software/solaris5_10/lib
PATH=$PATH:/lincfs/users/LINC/software/solaris5_10/bin:/lincfs/users/LINC/software/solaris5_10/include
MANPATH=$MANPATH:/lincfs/users/LINC/software/solaris5_10/share/man
else
#otherwise, it is Solaris 8 (to my knowledge, we only have 10 and 8 at CACS)
if [ `echo `` uname -r ` == '5.8' ]; then
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lincfs/users/LINC/software/solaris5_8/lib
PATH=$PATH:/lincfs/users/LINC/software/solaris5_8/bin:/lincfs/users/LINC/software/solaris5_8/include
MANPATH=$MANPATH:/lincfs/users/LINC/software/solaris5_8/share/man
fi
fi
else
#If it isn't Solaris, then probably Linux (let's make sure)
if [ ${linctemp} == 'Linux' ]; then
#Right now, we are supporting two versions of Linux - both CentOS
#So, let's make sure it is CentOS
if [ `cat /etc/redhat-release | cut -d ' ' -f1` == 'CentOS' ]; then
#Now, check to see if it is CentOS4 - note, I believe the CentOS4 machines are all 32-bit
if [ `cat /etc/redhat-release | cut -d ' ' -f3 | cut -c1` == '4' ]; then
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lincfs/users/LINC/software/centOS4/lib
PATH=$PATH:/lincfs/users/LINC/software/centOS4/bin:/lincfs/users/LINC/software/centOS4/include
MANPATH=$MANPATH:/lincfs/users/LINC/software/centOS4/share/man
else
#If not CentOS4, then we also support 64-bit CentOS5 (I'm currently supporting 32-bit CentOS5)
if [ `cat /etc/redhat-release | cut -d ' ' -f3 | cut -c1` == '5' ]; then
if [`uname -i` == 'x86_64']; then
JAVA_HOME=/usr/java/jdk1.6.0
export JAVA_HOME
PATH=/lincfs/users/LINC/software/centOS5_64/bin:/lincfs/users/LINC/software/centOS5_64/include:${PATH}
LD_LIBRARY_PATH=/usr/lib64:/lincfs/users/LINC/software/centOS5_64/lib64:/lincfs/users/LINC/software/centOS5_64/lib:${LD_LIBRARY_PATH}:/lib64:/lib
MANPATH=/lincfs/users/LINC/software/centOS5_64/share/man:/lincfs/users/LINC/software/centOS5_64/man:${MANPATH}
if [ $PKG_CONFIG_PATH ]; then
PKG_CONFIG_PATH=/usr/lib64/pkgconfig:$PKG_CONFIG_PATH
else
PKG_CONFIG_PATH=/usr/lib64/pkgconfig
fi
fi
fi
fi
fi
fi
fi
#NOTE, if the command below is already in .bash_profile, then you don't need to duplicate it.
# Just put the lines from (and including) linctemp through the final fi before the export command.
export LD_LIBRARY_PATH PATH MANPATH
#END LINC RELATED STATEMENTS
