|
1 #!/bin/bash |
|
2 |
|
3 # |
|
4 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
5 # All rights reserved. |
|
6 # This component and the accompanying materials are made available |
|
7 # under the terms of the License "Eclipse Public License v1.0" |
|
8 # which accompanies this distribution, and is available |
|
9 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
10 # |
|
11 # Initial Contributors: |
|
12 # Nokia Corporation - initial contribution. |
|
13 # |
|
14 # Contributors: |
|
15 # |
|
16 # Description: |
|
17 # |
|
18 if [ ! $HELIUM_HOME ] ; then |
|
19 export HELIUM_HOME=$(dirname $(readlink /proc/$$/fd/255)) |
|
20 fi |
|
21 |
|
22 # For nokia specific enviroment configurations. |
|
23 if [ -f $HELIUM_HOME/extensions/nokia/env.sh ] ; then |
|
24 . $HELIUM_HOME/extensions/nokia/env.sh |
|
25 fi |
|
26 |
|
27 export LANG="en_US.UTF-8" |
|
28 export ANT_ARGS="-lib $HELIUM_HOME/extensions/nokia/external/antlibs -lib $HELIUM_HOME/extensions/nokia/external/helium-nokia-antlib/bin -lib $HELIUM_HOME/external/helium-antlib/bin -lib $HELIUM_HOME/external/antlibs -lib $HELIUM_HOME/tools/common/java/lib -logger com.nokia.ant.HeliumLogger -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor -listener com.nokia.helium.diamonds.ant.HeliumListener -listener com.nokia.helium.logger.ant.listener.StatusAndLogListener" |
|
29 |
|
30 PYTHON_VERSION=`python -c "import sys; print sys.version[:3]"` |
|
31 PYTHON_VERSION2=$PYTHON_VERSION$HOSTTYPE |
|
32 PYTHONLIB=$HELIUM_HOME/external/python/lib/linux/$PYTHON_VERSION2 |
|
33 |
|
34 TEMP_PYTHONPATH="$PYTHONLIB:$HELIUM_HOME/external/python/lib/common:$HELIUM_HOME/tools/common/python/lib:$HELIUM_HOME/tools/common/python/scripts:$HELIUM_HOME/extensions/nokia/external/python/lib/2.5:$HELIUM_HOME/extensions/nokia/tools/common/python/lib" |
|
35 |
|
36 if [ ! $PYTHONPATH ] ; then |
|
37 export PYTHONPATH=$TEMP_PYTHONPATH |
|
38 else |
|
39 export PYTHONPATH="$PYTHONPATH:$TEMP_PYTHONPATH" |
|
40 fi |
|
41 |
|
42 TEMP_JYTHONPATH="$HELIUM_HOME/external/python/lib/2.5/jython-2.5-py2.5.egg:$PYTHONPATH" |
|
43 |
|
44 if [ ! $JYTHONPATH ] ; then |
|
45 export JYTHONPATH=$TEMP_JYTHONPATH |
|
46 else |
|
47 export JYTHONPATH="$JYTHONPATH:$TEMP_JYTHONPATH" |
|
48 fi |
|
49 |
|
50 TEMP_PERL5LIB="$HELIUM_HOME/tools/common/packages" |
|
51 if [ ! $PERL5LIB ] ; then |
|
52 PERL5LIB=$TEMP_PERL5LIB |
|
53 else |
|
54 PERL5LIB="$PERL5LIB:$TEMP_PERL5LIB" |
|
55 fi |
|
56 |
|
57 |
|
58 if [ $HOST ]; then |
|
59 export COMPUTERNAME=$HOST |
|
60 elif [ $HOSTNAME ]; then |
|
61 export COMPUTERNAME=$HOSTNAME |
|
62 else |
|
63 export COMPUTERNAME=$(hostname) |
|
64 fi |
|
65 |
|
66 CWD=`pwd` |
|
67 |
|
68 if [ ! -e "$PYTHONLIB" ] ; then |
|
69 mkdir $PYTHONLIB |
|
70 cp $HELIUM_HOME/external/python/lib/linux/site.py $PYTHONLIB |
|
71 fi |
|
72 |
|
73 if [ ! -e "$PYTHONLIB/4Suite_XML-1.0.2.egg" ] ; then |
|
74 cp $HELIUM_HOME/external/python/lib/linux/easy-install.pth $PYTHONLIB |
|
75 tar xvfz $HELIUM_HOME/external/python/lib/linux/4Suite-XML-1.0.2.tar.gz -C $PYTHONLIB > /dev/null |
|
76 cd $PYTHONLIB/4Suite-XML-1.0.2 |
|
77 python setup.py bdist_egg > /dev/null |
|
78 mv dist/*.egg $PYTHONLIB/4Suite_XML-1.0.2.egg |
|
79 fi |
|
80 |
|
81 if [ ! -e "$PYTHONLIB/lxml-1.3.6.egg" ] ; then |
|
82 cp $HELIUM_HOME/external/python/lib/linux/easy-install.pth $PYTHONLIB |
|
83 tar xvfz $HELIUM_HOME/external/python/lib/linux/lxml-1.3.6.tgz -C $PYTHONLIB > /dev/null |
|
84 cd $PYTHONLIB/lxml-1.3.6 |
|
85 python setup.py bdist_egg > /dev/null |
|
86 mv dist/*.egg $PYTHONLIB/lxml-1.3.6.egg |
|
87 fi |
|
88 |
|
89 if [ ! -e "$PYTHONLIB/PyXML-0.8.4.egg" ] ; then |
|
90 cp $HELIUM_HOME/external/python/lib/linux/easy-install.pth $PYTHONLIB |
|
91 tar xvfz $HELIUM_HOME/external/python/lib/linux/PyXML-0.8.4.tar.gz -C $PYTHONLIB > /dev/null |
|
92 cd $PYTHONLIB/PyXML-0.8.4 |
|
93 python setup.py bdist > /dev/null |
|
94 mv build/lib* $PYTHONLIB/PyXML-0.8.4.egg |
|
95 fi |
|
96 |
|
97 cd $CWD |
|
98 |
|
99 export USERNAME=$USER |
|
100 export SYMSEE_VERSION="not_in_use" |
|
101 export PID=$$ |
|
102 export TEMP="/tmp/$USER" |
|
103 if [ $JOB_ID ] ; then |
|
104 export HELIUM_CACHE_DIR="$TEMP/helium/$USER/$JOB_ID" |
|
105 else |
|
106 export HELIUM_CACHE_DIR="$TEMP/helium/$USER" |
|
107 fi |
|
108 export ANT_OPTS="-Dlog4j.configuration=com/nokia/log4j.xml -Dlog4j.cache.dir=$HELIUM_CACHE_DIR" |
|
109 export PYTHON_CACHEDIR="$HELIUM_CACHE_DIR/python" |
|
110 |
|
111 mkdir -p $HELIUM_CACHE_DIR |
|
112 |
|
113 if [ ! $EPOCROOT ]; then |
|
114 export EPOCROOT="/" |
|
115 fi |
|
116 exec ant -Dpython.cachedir=$PYTHON_CACHEDIR -Dhelium.dir=$HELIUM_HOME -Dpython.path=$PYTHONPATH -Dcache.dir=$HELIUM_CACHE_DIR $* |