generate apache config file for jasmine
[mkws-moved-to-github.git] / test / bin / apache-template-update
1 #!/bin/sh
2 # Copyright (c) 2014-2014 IndexData ApS. http://indexdata.com
3 # Wolfram Schneider
4 #
5 # generate temp config file for testing
6 #
7
8 export APACHE_SERVER_ROOT=$(pwd)
9 export APACHE_RUN_USER=$(whoami)
10 export APACHE_RUN_GROUP=$(groups | awk '{ print $1 }')
11 export APACHE_PID_FILE=$PWD/logs/mkws-jasmine.pid
12 export APACHE_LOG_DIR=$PWD/logs
13 export APACHE_PORT=4040
14
15 export MKWS_ROOT=$(pwd)/..
16
17 : ${MKWS_APACHE_TEMPLATE="$MKWS_ROOT/tools/apache2/jasmine-dev.template"}
18 : ${MKWS_APACHE_FILE="$MKWS_ROOT/tools/apache2/jasmine-dev"}
19
20 perl -npe 's,\${(.*?)},$ENV{$1},g; ' $MKWS_APACHE_TEMPLATE > $MKWS_APACHE_FILE.tmp
21 mv -f $MKWS_APACHE_FILE.tmp $MKWS_APACHE_FILE
22