-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstartapache
55 lines (38 loc) · 1.55 KB
/
startapache
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
#!/bin/bash
# This script uses MESOS_SOURCE_DIR and MESOS_BUILD_DIR which come
# from configuration substitutions.
MESOS_SOURCE_DIR=/armadillo/users/sammyst/src/mesos-0.19.0
MESOS_BUILD_DIR=/armadillo/users/sammyst/src/mesos-0.19.0
# Use colors for errors.
. ${MESOS_SOURCE_DIR}/support/colors.sh
# Force the use of the Python interpreter configured during building.
test ! -z "${PYTHON}" && \
echo "${RED}Ignoring PYTHON environment variable (using /usr/bin/python)${NORMAL}"
PYTHON=/usr/bin/python
DISTRIBUTE_EGG=${MESOS_BUILD_DIR}/3rdparty/distribute-0.6.26/dist/
DISTRIBUTE_EGG+=distribute-0.6.26-py2.7.egg
test ! -e ${DISTRIBUTE_EGG} && \
echo "${RED}Failed to find ${DISTRIBUTE_EGG}${NORMAL}" && \
exit 1
PROTOBUF=${MESOS_BUILD_DIR}/3rdparty/libprocess/3rdparty/protobuf-2.5.0
PROTOBUF_EGG=${PROTOBUF}/python/dist/
PROTOBUF_EGG+=protobuf-2.5.0-py2.7.egg
test ! -e ${PROTOBUF_EGG} && \
echo "${RED}Failed to find ${PROTOBUF_EGG}${NORMAL}" && \
exit 1
MESOS_EGG=${MESOS_BUILD_DIR}/src/python/dist/
MESOS_EGG+=mesos-0.19.0-py2.7-linux-x86_64.egg
test ! -e ${MESOS_EGG} && \
echo "${RED}Failed to find ${MESOS_EGG}${NORMAL}" && \
exit 1
if [ "`uname`" == "SunOS" ]; then
PYTHON=python2.6
fi
SCRIPT=${MESOS_SOURCE_DIR}/src/examples/python/startapache.py
test ! -e ${SCRIPT} && \
echo "${RED}Failed to find ${SCRIPT}${NORMAL}" && \
exit 1
PYTHONPATH="${DISTRIBUTE_EGG}:${MESOS_EGG}:${PROTOBUF_EGG}" \
exec ${PYTHON} ${SCRIPT} "${@}"
#export PYTHONPATH=`dirname $0`/../../lib/python:$PYTHONPATH
#$PYTHON `dirname $0`/startapache.py $@