forked from eic/epic-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
environ.sh
39 lines (32 loc) · 1.12 KB
/
environ.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
#!/bin/bash
# run `source environ.sh /path/to/delphes/repo`, otherwise pass no
# argument to use the default location
# - it may be useful to set your own default location (hard-coded)
# - if you are in a container, environment may already be set
if [ $# -eq 1 ]; then
# user-specified delphes location
delphesDir=$1
elif [ "$DELPHES_HOME" = "/opt/delphes" ]; then
# assume we are in a container, and delphes env is likely already set
delphesDir=$DELPHES_HOME
else
# default delphes location (hard-coded)
delphesDir=${HOME}/builds/delphes
fi
echo "delphes repository expected at $delphesDir"
if [ -f "$delphesDir/DelphesEnv.sh" ]; then
# source delphes environment
cd $delphesDir
source DelphesEnv.sh
echo "DELPHES_HOME set to $DELPHES_HOME"
export PATH=$PATH:$DELPHES_HOME
echo "success!"
cd -
# symlink delphes external stuff (so that we can run analysis code here)
ln -sf $DELPHES_HOME/external ./
else
echo "ERROR: DelphesEnv.sh not found, is the repo really at ${delphesDir}?"
fi
export MSTWPDF_HOME=$(pwd)/mstwpdf
echo "MSTWPDF at $MSTWPDF_HOME"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$MSTWPDF_HOME"