forked from cms-sw/cms-common
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcmsset_default.sh
executable file
·62 lines (53 loc) · 1.28 KB
/
cmsset_default.sh
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
cms_basedir=@CMS_PREFIX@
here=${cms_basedir}
export PATH=${cms_basedir}/common:$PATH
if [ "$VO_CMS_SW_DIR" != "" ]
then
here=$VO_CMS_SW_DIR
else
if [ ! "X$OSG_APP" = "X" ] && [ -d "$OSG_APP/cmssoft/cms" ]; then
here="$OSG_APP/cmssoft/cms"
fi
fi
if [ ! $SCRAM_ARCH ]
then
SCRAM_ARCH=$(${cms_basedir}/common/cmsarch)
if [ ! -d ${here}/${SCRAM_ARCH}/etc/profile.d ]
then
SCRAM_ARCH=@SCRAM_ARCH@
fi
export SCRAM_ARCH
fi
for arch in share ${SCRAM_ARCH} ; do
if [ -d $here/${arch}/etc/profile.d ]
then
for pkg in $(/bin/ls $here/${arch}/etc/profile.d/ | grep 'S.*[.]sh')
do
source $here/${arch}/etc/profile.d/$pkg
done
unset pkg
fi
done
if [ ! $CMS_PATH ]
then
export CMS_PATH=$here
fi
# decouple SITECONF location form CMS_PATH to allow sub-sites:
if [ ! $SITECONFIG_PATH ]
then
export SITECONFIG_PATH=${CMS_PATH}/SITECONF/local
fi
# aliases
alias cmsenv='eval `scramv1 runtime -sh`'
alias cmsrel='scramv1 project CMSSW'
if [ -f $SITECONFIG_PATH/JobConfig/cmsset_local.sh ]; then
. $SITECONFIG_PATH/JobConfig/cmsset_local.sh
fi
if [ ! $CVSROOT ]
then
CVSROOT=:gserver:cmssw.cvs.cern.ch:/local/reps/CMSSW
export CVSROOT
fi
MANPATH=${CMS_PATH}/share/man:${MANPATH}
export MANPATH
unset here cms_basedir arch