#!/bin/sh 
#*************************************************************
# $Id: makeupgconf,v 1.4.2.2 2007/12/12 17:12:29 lyan Exp $
#	Create config files from the build ups.config, the 
#		upg.conf file tailored for this site,
#		and the supplied templates
#*************************************************************
CONFIG=/usr/awc/conf/awc.conf
#DEFAULTS=/usr/awc/bin/eiab.defaults
#. $DEFAULTS
. $CONFIG

# make sure SERVERADMIN has something in it or apache won't start
if [ "$SERVERADMIN" = "" ]; then
    SERVERADMIN=root@localhost
fi

export SERVERBUILD=\"`/sbin/service server buildinfo | cut -d ' ' -f 4`\"

cd /usr/awc/newupg
mkdir -p /usr/awc/newupg/newconf
if [ a$SERVERNAME = a ] ; then
    SERVERNAME=$INTERNALHOSTNAME.$INTERNALDOMAINNAME
fi
/usr/awc/newupg/subst.pl < startup/httpd.conf.in > newconf/httpd.conf.out
# Branding - construct the IE and Netscape css files
cat startup/common.css.in > newconf/styles.css.out
/bin/grep -vi cursor newconf/styles.css.out > newconf/NNPCstyles.css.out
cat startup/netscape.css.in >> newconf/NNPCstyles.css.out
# Branding - construct the xsl file
/usr/awc/newupg/subst.pl < startup/vcs_lib_branding.xsl.in > newconf/vcs_lib_branding.xsl.out
