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,20 +177,10 @@ rotate_log_file () { ...@@ -177,20 +177,10 @@ 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}
for i in 'openair1' 'openair2' 'openair3' 'openair-cn' 'targets'
do
index=`echo $path | grep -b -o $i | cut -d: -f1`
#echo ${path%$token*}
if [[ $index -lt $length_path && index -gt 0 ]]
then
index=`expr $index - 1`
openair_path=`echo $path | cut -c1-$index`
#openair_path=`echo ${path:0:$index}`
export OPENAIR_DIR=$openair_path export OPENAIR_DIR=$openair_path
export OPENAIR_HOME=$openair_path export OPENAIR_HOME=$openair_path
export OPENAIR1_DIR=$openair_path/openair1 export OPENAIR1_DIR=$openair_path/openair1
...@@ -198,10 +188,7 @@ set_openair() { ...@@ -198,10 +188,7 @@ set_openair() {
export OPENAIR3_DIR=$openair_path/openair3 export OPENAIR3_DIR=$openair_path/openair3
export OPENAIRCN_DIR=$openair_path/openair-cn export OPENAIRCN_DIR=$openair_path/openair-cn
export OPENAIR_TARGETS=$openair_path/targets export OPENAIR_TARGETS=$openair_path/targets
return 0 export CDPATH=$CDPATH:$openair_path
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