SetupReleaseOnTrshare

From ATLAS-TRIUMF

Jump to: navigation, search
#!/usr/local/bin/zsh
 
release=11.2.0
 
echo you gave $# command line parameters: $*
if [ -n "$2" ] ; then
  echo "Script accepts at most one parameters (the release number)"
  exit
fi
if [ -n "$1" ] ; then
  release=$1
  shift  # don't want the parameter hanging around!
fi
echo Setting release number to $release
 
if [[ -z $ATLAS_ROOT ]] ; then
  echo "Setting ATLAS_ROOT to /triumfcs/trshare/atlas/AtlasSoftware"
  export ATLAS_ROOT="/triumfcs/trshare/atlas/AtlasSoftware"
fi
 
 
aliasdir=${ATLAS_ROOT}/AthenaReleases/${release}
 
echo "Resetting ATLAS_RELEASE_PATH"
export ATLAS_RELEASE_PATH=$ATLAS_ROOT/AthenaReleases/${release}
 
echo "Setting up release ${release}"
 
workdir=${HOME}/AthenaWork/${release}
mkdir -p $workdir
 
echo Working directory is $workdir
 
if [ ! -f ${aliasdir}/setup.sh ]; then
  echo "Dont see top level pacman setup.sh in ${aliasdir}"
  exit
fi
 
echo "now source ${aliasdir}/setup.sh..."
source ${aliasdir}/setup.sh
 
export CMTPATH=$workdir:$CMTPATH
 
echo "now source dist/${release}/Control/AthenaRunTime/*/cmt/setup.sh"
source  ${ATLAS_RELEASE_PATH}/dist/$release/Control/AthenaRunTime/*/cmt/setup.sh
echo "now the setup for v-atlas..."
# if GeoModelDisplay checked out:
#source  $workdir/AtlasGeometryCommon/GeoModelDisplay/GeoModelDisplay-*/cmt/setup.sh
#echo "using checked out version of GeoModelDisplay for v-atlas scripts"
 
# if working from release:
source  ${ATLAS_RELEASE_PATH}/dist/$release/AtlasGeometryCommon/GeoModelDisplay/GeoModelDisplay-*/cmt/setup.sh
echo "using release version of GeoModelDisplay for v-atlas scripts"
 
if [[ -z $AFSUSERNAME ]] ; then
  echo "Setting AFSUSERNAME to ${USERNAME}"
  export AFSUSERNAME=${USERNAME}
fi
 
echo "Setting up CVS access via ssh"
export CVSROOT=":ext:${AFSUSERNAME}@atlas-sw.cern.ch:/atlascvs"
export CVS_RSH="ssh"
 
echo CVSROOT is:
echo $CVSROOT
echo "and CVS_RSH is (should be ssh):"
echo $CVS_RSH
Personal tools