1 | |
---|
2 | # |
---|
3 | # Usage : |
---|
4 | # sh> . setup.sh |
---|
5 | # |
---|
6 | |
---|
7 | #set -x |
---|
8 | |
---|
9 | OSC_home="@@absolute_dir@@" |
---|
10 | |
---|
11 | if [ "${OSC_home}" = '@@absolute_dir@@' ] ; then |
---|
12 | echo ' The OpenScientist setup scripts had not been installed.' |
---|
13 | echo '' |
---|
14 | echo ' In the file :' |
---|
15 | echo ' OpenScientist/<vers>/setup.sh' |
---|
16 | echo ' someone has to replace ' |
---|
17 | echo ' @@absolute_dir@@' |
---|
18 | echo ' by the absolute path of the package.' |
---|
19 | echo '' |
---|
20 | echo ' If having the write access, this replacement can be done' |
---|
21 | echo ' on the setup scripts by using the install script :' |
---|
22 | echo ' cd <install_path>/OpenScientist/<vers>' |
---|
23 | echo ' ./install' |
---|
24 | echo '' |
---|
25 | return |
---|
26 | fi |
---|
27 | |
---|
28 | # The "." is for the OpenPAW on-the-fly compilation and loading. |
---|
29 | if [ `uname` = "Linux" ]; then |
---|
30 | lib_path="${OSC_home}/lib:." |
---|
31 | if [ -z "${LD_LIBRARY_PATH}" ] ; then |
---|
32 | LD_LIBRARY_PATH="${lib_path}" |
---|
33 | export LD_LIBRARY_PATH |
---|
34 | else |
---|
35 | status=1;(echo $LD_LIBRARY_PATH | grep "${lib_path}" >& /dev/null ) && status=0 |
---|
36 | if [ $status != 0 ] ; then |
---|
37 | LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${lib_path}" |
---|
38 | export LD_LIBRARY_PATH |
---|
39 | fi |
---|
40 | fi |
---|
41 | unset lib_path |
---|
42 | fi |
---|
43 | |
---|
44 | if [ `uname` = "Darwin" ]; then |
---|
45 | lib_path="${OSC_home}/lib:${OSC_home}/bin:." |
---|
46 | if [ -z "${DYLD_LIBRARY_PATH}" ] ; then |
---|
47 | DYLD_LIBRARY_PATH="${lib_path}" |
---|
48 | export DYLD_LIBRARY_PATH |
---|
49 | else |
---|
50 | status=1;(echo $DYLD_LIBRARY_PATH | grep "${lib_path}" >& /dev/null ) && status=0 |
---|
51 | if [ $status != 0 ] ; then |
---|
52 | DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}:${lib_path}" |
---|
53 | export DYLD_LIBRARY_PATH |
---|
54 | fi |
---|
55 | fi |
---|
56 | unset lib_path |
---|
57 | fi |
---|
58 | |
---|
59 | bin_path="${OSC_home}/bin" |
---|
60 | if [ -z "${PATH}" ] ; then |
---|
61 | PATH="${bin_path}" |
---|
62 | export PATH |
---|
63 | else |
---|
64 | status=1;(echo $PATH | grep "${bin_path}" >& /dev/null ) && status=0 |
---|
65 | if [ $status != 0 ] ; then |
---|
66 | PATH="${PATH}:${bin_path}" |
---|
67 | export PATH |
---|
68 | fi |
---|
69 | fi |
---|
70 | unset bin_path |
---|
71 | |
---|
72 | # AIDA : |
---|
73 | AIDA_HOME_DIR="${OSC_home}";export AIDA_HOME_DIR |
---|
74 | |
---|
75 | # else : |
---|
76 | COIN_DONT_INFORM_INDIRECT_RENDERING="1" |
---|
77 | export COIN_DONT_INFORM_INDIRECT_RENDERING |
---|
78 | |
---|
79 | unset OSC_home |
---|