Commit 5cd48016 authored by thomasl's avatar thomasl

Fix initial directories setup


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6018 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 9c6abb98
...@@ -177,31 +177,18 @@ rotate_log_file () { ...@@ -177,31 +177,18 @@ rotate_log_file () {
} }
set_openair() { set_openair() {
path=`pwd` fullpath=`readlink -f $BASH_SOURCE`
declare -i length_path [ -f "/.$fullpath" ] || fullpath=`readlink -f $PWD/$fullpath`
declare -i index openair_path=${fullpath%/targets/*}
length_path=${#path}
export OPENAIR_DIR=$openair_path
for i in 'openair1' 'openair2' 'openair3' 'openair-cn' 'targets' export OPENAIR_HOME=$openair_path
do export OPENAIR1_DIR=$openair_path/openair1
index=`echo $path | grep -b -o $i | cut -d: -f1` export OPENAIR2_DIR=$openair_path/openair2
#echo ${path%$token*} export OPENAIR3_DIR=$openair_path/openair3
if [[ $index -lt $length_path && index -gt 0 ]] export OPENAIRCN_DIR=$openair_path/openair-cn
then export OPENAIR_TARGETS=$openair_path/targets
index=`expr $index - 1` export CDPATH=$CDPATH:$openair_path
openair_path=`echo $path | cut -c1-$index`
#openair_path=`echo ${path:0:$index}`
export OPENAIR_DIR=$openair_path
export OPENAIR_HOME=$openair_path
export OPENAIR1_DIR=$openair_path/openair1
export OPENAIR2_DIR=$openair_path/openair2
export OPENAIR3_DIR=$openair_path/openair3
export OPENAIRCN_DIR=$openair_path/openair-cn
export OPENAIR_TARGETS=$openair_path/targets
return 0
fi
done
return -1
} }
wait_process_started () { wait_process_started () {
......
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