Commit 73ecffd9 authored by thomasl's avatar thomasl

fix set_openair() function to be correct from any launching directory


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6034 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 93b91fb3
...@@ -872,18 +872,19 @@ create_hss_database(){ ...@@ -872,18 +872,19 @@ create_hss_database(){
############################### ###############################
set_openair_env(){ set_openair_env(){
index=`pwd | grep -b -o /targets | cut -d: -f1` fullpath=`readlink -f $BASH_SOURCE`
if [ $index = "" ] ; then [ -f "/.$fullpath" ] || fullpath=`readlink -f $PWD/$fullpath`
echo_error "Please run the script from targets directory or any child directories" openair_path=${fullpath%/targets/*}
else openair_path=${openair_path%/openair-cn/*}
oai_path=`pwd | cut -c1-$index` openair_path=${openair_path%/openair[123]/*}
export OPENAIR_HOME=$oai_path
export OPENAIR1_DIR=$oai_path/openair1 export OPENAIR_DIR=$openair_path
export OPENAIR2_DIR=$oai_path/openair2 export OPENAIR_HOME=$openair_path
export OPENAIR3_DIR=$oai_path/openair3 export OPENAIR1_DIR=$openair_path/openair1
export OPENAIR_TARGETS=$oai_path/targets export OPENAIR2_DIR=$openair_path/openair2
export OPENAIRCN_DIR=$oai_path/openair-cn export OPENAIR3_DIR=$openair_path/openair3
fi export OPENAIRCN_DIR=$openair_path/openair-cn
export OPENAIR_TARGETS=$openair_path/targets
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment