2 # Copyright (c) 2014-2014 IndexData ApS. http://indexdata.com
5 # generate temp config file for testing
8 export APACHE_SERVER_ROOT=$(pwd)
9 export APACHE_RUN_USER=$(whoami)
10 export APACHE_RUN_GROUP=$(groups | awk '{ print $1 }')
12 export APACHE_LOG_DIR=$APACHE_SERVER_ROOT/logs
13 export APACHE_PID_FILE=$APACHE_LOG_DIR/mkws-jasmine.pid
14 export APACHE_LOCK_FILE=$APACHE_LOG_DIR/accept.lock
15 : ${APACHE_PORT=4040}; export APACHE_PORT
17 export MKWS_ROOT=$(pwd)/..
22 Darwin ) MKWS_OS=macos
23 test -e libexec || ln -fs /usr/libexec .
25 Linux ) MKWS_OS=debian
26 if [ -e /etc/debian_version ]; then
28 # Ubuntu with Apache 2.2 can continue using debian
29 if /usr/bin/dpkg -s apache2 | grep -q "Version: 2\.4\..*ubuntu"; then
34 if [ -e /etc/redhat-release ]; then
41 export APACHE_MODULES="$MKWS_ROOT/tools/apache2/jasmine-dev.apache-modules.$MKWS_OS.conf"
43 if [ "$APACHE_VERSION" = "2.4" ]; then
44 : ${MKWS_APACHE_TEMPLATE="$MKWS_ROOT/tools/apache2/jasmine-dev.template-2.4"}
46 : ${MKWS_APACHE_TEMPLATE="$MKWS_ROOT/tools/apache2/jasmine-dev.template"}
48 : ${MKWS_APACHE_FILE="$APACHE_LOG_DIR/jasmine-dev"}
51 perl -npe 's,\${(.*?)},$ENV{$1},g; ' $MKWS_APACHE_TEMPLATE > $MKWS_APACHE_FILE.tmp
52 mv -f $MKWS_APACHE_FILE.tmp $MKWS_APACHE_FILE