#!/bin/bash

set -e

source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh

echo "---> Enabling s2i support in httpd24 image"

config_s2i

echo "---> Installing application source"
cp -af /tmp/src/. ./
rm -rf ./.hg ./.git ./.svn

# Fix source directory permissions
fix-permissions ./

process_extending_files ${HTTPD_APP_ROOT}/src/httpd-post-assemble/ ${HTTPD_CONTAINER_SCRIPTS_PATH}/post-assemble/

# Fix source directory permissions
fix-permissions ./
