-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcmsset_default.csh
executable file
·61 lines (50 loc) · 1.49 KB
/
cmsset_default.csh
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
set cms_basedir=@CMS_PREFIX@
if (${?PATH}) then
setenv PATH ${cms_basedir}/common:$PATH
else
setenv PATH ${cms_basedir}/common
endif
set here=${cms_basedir}
if ( ${?VO_CMS_SW_DIR} ) then
set here=$VO_CMS_SW_DIR
else
if ( ${?OSG_APP} ) then
set here=$OSG_APP/cmssoft/cms
endif
endif
if ( ! ${?SCRAM_ARCH}) then
setenv SCRAM_ARCH `sh -c ${cms_basedir}/common/cmsarch`
if ( ! -d $here/${SCRAM_ARCH}/etc/profile.d ) then
setenv SCRAM_ARCH `echo ${SCRAM_ARCH} | cut -d_ -f1 | sed -E 's/^(cs|cc|alma|rocky|rhel)/el/'`_`echo ${SCRAM_ARCH} | cut -d_ -f2-`
endif
endif
foreach arch (share ${SCRAM_ARCH})
if ( -d $here/${arch}/etc/profile.d ) then
foreach pkg ( `/bin/ls ${here}/${arch}/etc/profile.d/ | grep 'S.*[.]csh'` )
source ${here}/${arch}/etc/profile.d/$pkg
end
endif
unset pkg
end
if ( ! ${?CMS_PATH} ) then
setenv CMS_PATH $here
endif
# decouple SITECONF location form CMS_PATH to allow sub-sites:
if ( ! ${?SITECONFIG_PATH} ) then
setenv SITECONFIG_PATH ${CMS_PATH}/SITECONF/local
endif
# aliases
alias cmsenv 'eval `scramv1 runtime -csh`'
alias cmsrel 'scramv1 project CMSSW'
if( -e $SITECONFIG_PATH/JobConfig/cmsset_local.csh ) then
source $SITECONFIG_PATH/JobConfig/cmsset_local.csh
endif
if ( ! ${?CVSROOT}) then
setenv CVSROOT :gserver:cmssw.cvs.cern.ch:/local/reps/CMSSW
endif
if (${?MANPATH}) then
setenv MANPATH $CMS_PATH/share/man:$MANPATH
else
setenv MANPATH $CMS_PATH/share/man
endif
unset here cms_basedir arch