-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate_bashrc.sh
More file actions
executable file
·51 lines (40 loc) · 1.44 KB
/
generate_bashrc.sh
File metadata and controls
executable file
·51 lines (40 loc) · 1.44 KB
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
#!/bin/bash
generate_bashrc()
{
local custom4_prefix=/cvmfs/juno.ihep.ac.cn/el9_amd64_gcc11/Release/J24.2.0/ExternalLibs/custom4/0.1.8
local custom4_prefix_relative=\${JUNOTOP}/ExternalLibs/custom4/0.1.8
local CUSTOM4_PREFIX=${CUSTOM4_PREFIX:-$custom4_prefix}
#local CUSTOM4_PREFIX_RELATIVE=${CUSTOM4_PREFIX_RELATIVE:-$custom4_prefix_relative}
local CUSTOM4_PREFIX_RELATIVE=${CUSTOM4_PREFIX}
cat << EOH
## generated $(date) by $(realpath $BASH_SOURCE) $FUNCNAME
if [ -z "\${JUNOTOP}" ]; then
export JUNO_EXTLIB_custom4_HOME=$CUSTOM4_PREFIX
else
export JUNO_EXTLIB_custom4_HOME=$CUSTOM4_PREFIX_RELATIVE
fi
EOH
cat << \EOS
export PATH=${JUNO_EXTLIB_custom4_HOME}/bin:${PATH}
if [ -d ${JUNO_EXTLIB_custom4_HOME}/lib ];
then
export LD_LIBRARY_PATH=${JUNO_EXTLIB_custom4_HOME}/lib:${LD_LIBRARY_PATH}
fi
if [ -d ${JUNO_EXTLIB_custom4_HOME}/lib/pkgconfig ];
then
export PKG_CONFIG_PATH=${JUNO_EXTLIB_custom4_HOME}/lib/pkgconfig:${PKG_CONFIG_PATH}
fi
if [ -d ${JUNO_EXTLIB_custom4_HOME}/lib64 ];
then
export LD_LIBRARY_PATH=${JUNO_EXTLIB_custom4_HOME}/lib64:${LD_LIBRARY_PATH}
fi
if [ -d ${JUNO_EXTLIB_custom4_HOME}/lib64/pkgconfig ];
then
export PKG_CONFIG_PATH=${JUNO_EXTLIB_custom4_HOME}/lib64/pkgconfig:${PKG_CONFIG_PATH}
fi
export CPATH=${JUNO_EXTLIB_custom4_HOME}/include:${CPATH}
export MANPATH=${JUNO_EXTLIB_custom4_HOME}/share/man:${MANPATH}
# For CMake search path
export CMAKE_PREFIX_PATH=${JUNO_EXTLIB_custom4_HOME}:${CMAKE_PREFIX_PATH}
EOS
}