-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathload_package.sh
executable file
·41 lines (37 loc) · 1.51 KB
/
load_package.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
#!/bin/bash
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
echo "This script should be sourced, not executed. Use 'source ${0}'"
exit 1
fi
echo "Select an option to activate:"
echo "1: Activate ROOT"
echo "2: Activate SVFIT"
echo "3: Activate CP-TOOLS"
echo "4: Activate OPTION4"
read -p "Enter the option number: " option
case $option in
1)
echo "Load ROOT..."
source /cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.32.02/x86_64-almalinux9.4-gcc114-opt/bin/thisroot.sh
;;
2)
echo "Load SVFIT..."
LD_LIBRARY_PATH=/usr/local/lib
CPPYY_BACKEND_LIBRARY=/cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.30.04/x86_64-centosstream9-gcc113-opt/lib/libcppyy_backend3_9.so
source /cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.30.04/x86_64-centosstream9-gcc113-opt/bin/thisroot.sh
export LIBRARY_PATH=$LIBRARY_PATH:$PWD/TauAnalysis/ClassicSVfit/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/TauAnalysis/ClassicSVfit/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.30.04/x86_64-centosstream9-gcc113-opt/lib/
python -c "import TauAnalysis.ClassicSVfit.wrapper.pybind_wrapper" && echo "Module is working" || echo "Module import failed"
;;
3)
echo "Load CP-TOOLS..."
source /cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.32.02/x86_64-almalinux9.4-gcc114-opt/bin/thisroot.sh
;;
4)
echo "Activating OPTION4..."
;;
*)
echo "Invalid option selected."
;;
esac