Skip to content
Snippets Groups Projects
Commit f756ee58 authored by lintao@ihep.ac.cn's avatar lintao@ihep.ac.cn
Browse files

setup the current InstallArea if the directory exists.

parent eca85067
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
# Author: Tao Lin <lintao@ihep.ac.cn> # Author: Tao Lin <lintao@ihep.ac.cn>
############################################################################## ##############################################################################
THISSCRITDIR=$(dirname $(readlink -e "${BASH_SOURCE[0]}" 2>/dev/null) 2>/dev/null) # Darwin readlink doesnt accept -e
function info:() { function info:() {
echo "INFO: $*" 1>&2 echo "INFO: $*" 1>&2
} }
...@@ -41,6 +43,19 @@ function setup-external() { ...@@ -41,6 +43,19 @@ function setup-external() {
} }
function setup-install-area() {
local installarea=$THISSCRITDIR/InstallArea
if [ ! -d "$installarea" ]; then
return
fi
export PATH=$installarea/bin:$PATH
export LD_LIBRARY_PATH=$installarea/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$installarea/lib:$PYTHONPATH
export PYTHONPATH=$installarea/python:$PYTHONPATH
export ROOT_INCLUDE_PATH=$installarea/include:$ROOT_INCLUDE_PATH
info: "Setup CEPCSW: $installarea"
}
############################################################################## ##############################################################################
# Parse the command line options # Parse the command line options
...@@ -54,3 +69,4 @@ fi ...@@ -54,3 +69,4 @@ fi
export CEPCSW_LCG_VERSION export CEPCSW_LCG_VERSION
setup-external setup-external
setup-install-area
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment