Skip to content

Instantly share code, notes, and snippets.

@kpedro88
Created August 24, 2022 19:32
Show Gist options
  • Save kpedro88/bc401ae8014d102995b983aeae7b4aa8 to your computer and use it in GitHub Desktop.
Save kpedro88/bc401ae8014d102995b983aeae7b4aa8 to your computer and use it in GitHub Desktop.
#!/bin/bash
TOOLS=(
pythia8 \
evtgen \
tauolapp \
# madgraph5amcatnlo \
)
TOOLFILE_LIST=""
for TOOL in ${TOOLS[@]}; do
TOOLFILE_LIST="$TOOLFILE_LIST $TOOL-toolfile"
done
eval $(curl -s -k https://raw.githubusercontent.com/cms-sw/cms-bot/master/config.map | grep 'SCRAM_ARCH=slc7_amd64_gcc10' | grep 'RELEASE_BRANCH=CMSSW_12_4_X')
git clone -b $PKGTOOLS_TAG [email protected]:cms-sw/pkgtools.git
git clone -b Pythia8307_124X [email protected]:kpedro88/cmsdist.git
pkgtools/cmsBuild -i build -a $SCRAM_ARCH -j 4 build $TOOLFILE_LIST
BUILDDIR=$PWD/build/$SCRAM_ARCH/external
WHICH_CMSSW=CMSSW_12_4_3
scramv1 project CMSSW $WHICH_CMSSW
TOOLDIR=$WHICH_CMSSW/config/toolbox/${SCRAM_ARCH}/tools/selected/
mkdir $WHICH_CMSSW/build
for TOOL in ${TOOLS[@]}; do
cp build/$SCRAM_ARCH/cms/${TOOL}-toolfile/*/etc/scram.d/${TOOL}.xml $TOOLDIR/
cp -r $BUILDDIR/$TOOL $WHICH_CMSSW/build/
sed -i 's~'$BUILDDIR'~$CMSSW_BASE/build~' $TOOLDIR/$TOOL.xml
done
cd $WHICH_CMSSW
eval `scramv1 runtime -sh`
for TOOL in ${TOOLS[@]}; do
scram setup $TOOL
done
cd $CMSSW_BASE/src
scram b checkdeps
scram b -j 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment