-
Notifications
You must be signed in to change notification settings - Fork 22
/
setup_git.sh
executable file
·85 lines (73 loc) · 2.27 KB
/
setup_git.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
checkVERSION(){
case $CMSSW_VERSION in
CMSSW_5_3_21)
echo "[`basename $0` ERROR] $CMSSW_VERSION (2012 8TeV analysis) is not anymore supported by ECALELF"
exit 1
;;
CMSSW_7_6_3)
echo "[`basename $0` ERROR] $CMSSW_VERSION (2015 13TeV analysis) is not anymore supported by ECALELF"
exit 1
;;
CMSSW_8_0_24_patch1)
echo "[INFO] Installing for $CMSSW_VERSION (2016 13TeV)"
;;
*)
echo "[`basename $0` ERROR] Sorry, $CMSSW_VERSION not configured for ECALELF"
echo " Supported releases are:"
echo " - CMSSW_8_0_24_patch1"
exit 1
;;
esac
}
case $# in
1)
echo "[STATUS] Creating $1 CMSSW release working area"
CMSSW_VERSION=$1
checkVERSION
scram project CMSSW ${CMSSW_VERSION} || exit 1
cd ${CMSSW_VERSION}/src
eval `scramv1 runtime -sh`
;;
*)
checkVERSION
;;
esac
export CMSSW_VERSION
# put in the right directory
cd $CMSSW_BASE/src
#########################################################################################
git cms-init
#########################################################################################
echo "[STATUS] Download ECALELF directory"
myDir=Calibration
if [ ! -d "$myDir" ];then
case "$USER" in
shervin)
# git clone --single-branch [email protected]:ECALELFS/ECALELF.git $myDir >> setup.log || exit 1 # read-only mode
git clone --single-branch https://github.com/ECALELFS/ECALELF.git $myDir >> setup.log || exit 1 # read-only mode
;;
*)
### if you are not Shervin download this to have some useful scripts
git clone --single-branch https://github.com/ECALELFS/ECALELF.git $myDir >> setup.log || exit 1 # read-only mode
cd $myDir/EcalAlCaRecoProducers/
git clone --single-branch https://github.com/ECALELFS/Utilities.git bin
;;
esac
fi
cd $CMSSW_BASE/src
#Other package to download:
# - Last stable pattuple code:
case $CMSSW_VERSION in
CMSSW_8_0_*)
git cms-merge-topic 16790 || exit 1
git cms-merge-topic ikrav:egm_id_80X_v1 || exit 1
git cms-merge-topic shervin86:slewrate || exit 1
;;
esac
# compile
echo "[INFO] Starting to compile"
scram b -j16 || {
echo "[INFO for USERS] You could get a C++ seg fault: Be persistent! from $CMSSW_BASE/src go for a scram b -j16 again :-)"
scram b
}