1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
#!/bin/sh
# WARNING: this is an ugly hack which was introduced in order to workaround
# shebang recursion issues with linux kernel << 2.6.32. It doesn't
# work as expected. Python addsitedir() needs to be implemented in
# shell in order to make it work.
ZPYPATH="$(echo $(for dir in /usr/lib/zope@ZVER@/lib/python/*.egg; do echo $dir; done) | sed 's/ /:/g')"
if [ -n "$PYTHONPATH" ]; then
export PYTHONPATH="$PYTHONPATH:$ZPYPATH"
else
export PYTHONPATH="$ZPYPATH"
fi
if [ -n "$INSTANCE_HOME" ]; then
export PYTHONPATH="$PYTHONPATH:${INSTANCE_HOME}/lib/python"
fi
/usr/bin/python@PYVER@ "$@"
|