-
Notifications
You must be signed in to change notification settings - Fork 22
/
updateCMSSW.sh
executable file
·52 lines (39 loc) · 1.25 KB
/
updateCMSSW.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
### ECALELF side:
if [ ! -d "cmssw" ]; then
mkdir /tmp/cmssw/
git clone [email protected]:shervin86/cmssw.git
ln -s cmssw /tmp/cmssw/
fi
git branch splittingForCMSSW
git checkout splittingForCMSSW
git filter-branch -f --prune-empty --subdirectory-filter EcalAlCaRecoProducers
git init --bare cmssw/tmpBareRepo/
git remote add cmsswMergeRepo cmssw/tmpBareRepo/
git push cmsswMergeRepo splittingForCMSSW
cd cmssw/
git remote add -f ecalelf tmpBareRepo/
git branch mergingECALELF
git checkout mergingECALELF
git merge -s recursive -Xtheirs -Xsubtree=Calibration/EcalAlCaRecoProducers ecalelf/splittingForCMSSW
git remote rm ecalelf
cd ..
git checkout test2
git branch -D splittingForCMSSW
git remote rm cmsswMergeRepo
rm cmssw/tmpBareRepo/ -Rf
exit 0
mv tmpBareRepo/ cmssw/
exit 0
exit 0
#git push origin splittingForCMSSW
#git subtree split --prefix=EcalAlCaRecoProducers -b split --squash
if [ "${CMSSW_VERSION}" != "" ];then
git cms-init;
git remote add -f ecalelf [email protected]:ECALELFS/ECALELF.git
git cms-addpkg Calibration
else
git clone [email protected]:shervin86/cmssw.git
cd cmssw
git remote add -f ecalelf ../tmpBareRepo/
fi
git merge -s recursive -Xsubtree=Calibration/EcalAlCaRecoProducers --no-commit ecalelf/splittingForCMSSW