-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
setenv
executable file
·64 lines (59 loc) · 1.68 KB
/
setenv
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/sh
function check_path ()
{
_path_=`pwd`
#echo "pwd = $_path_"
if [ ! -d ${_path_}/lib/corba ]; then
_path_=`dirname $0`
#echo "dirname \$0 = $_path_"
if [ ! -d ${_path_}/lib/corba ]; then
_path_=`dirname $BASH_ARGV`
#echo "dirname \$BASH_ARGV = $_path_"
if [ $BASH_ARGC -ne 1 ] || [ ! -d ${_path_}/lib/corba ]; then
echo 'Cannot determine R2CORBA_ROOT'
return 1
fi
fi
cd ${_path_}
fi
if [ ! -f ./Rakefile ]; then
echo 'Cannot determine R2CORBA_ROOT'
return 1
fi
return 0
}
_cwd_=`pwd`
check_path
if [ $? -eq 0 ]; then
echo "R2CORBA_ROOT = `pwd`"
R2CORBA_ROOT=`pwd`; export R2CORBA_ROOT
if [ "$1" == "-a" ] && [ -n $2 ]; then
export ACE_ROOT=$2
if [ -d ${ACE_ROOT}/TAO ]; then
# ACE_wrappers layout
ATCD_ROOT=${ACE_ROOT}
else
# flat layout
ATCD_ROOT=${ACE_ROOT}/..
fi
else
if [ -d ${R2CORBA_ROOT}/ACE/ACE ]; then
# flat layout
export ACE_ROOT=${R2CORBA_ROOT}/ACE/ACE
ATCD_ROOT=${R2CORBA_ROOT}/ACE
export TAO_ROOT=${R2CORBA_ROOT}/ACE/TAO
else
# old style ACE_wrappers layout
export ACE_ROOT=${R2CORBA_ROOT}/ACE/ACE_wrappers
ATCD_ROOT=${ACE_ROOT}
fi
fi
export TAO_ROOT=${ATCD_ROOT}/TAO
export MPC_ROOT=${ATCD_ROOT}/MPC
export LD_LIBRARY_PATH=${ACE_ROOT}/lib:${LD_LIBRARY_PATH}
export DYLD_LIBRARY_PATH=${ACE_ROOT}/lib:${DYLD_LIBRARY_PATH}
export DYLD_FALLBACK_LIBRARY_PATH=${ACE_ROOT}/lib:${R2CORBA_ROOT}/ext:${DYLD_FALLBACK_LIBRARY_PATH}
export PATH=${R2CORBA_ROOT}/bin:${ACE_ROOT}/bin:${PATH}
export RUBYLIB=.:${R2CORBA_ROOT}/lib:${R2CORBA_ROOT}/ridl/lib:${R2CORBA_ROOT}/ext:${R2CORBA_ROOT}/test
fi
cd $_cwd_