#!/bin/bash die() { echo "#####" echo $1 echo "#####" exit 1 } if [ $1 = "install" ]; then # fix lib location sed -e "s|/absolute/path/to/your/lib|${MY_INSTALLDIR}/lib|" -i ${MY_INSTALLDIR}/bin/LocalLib.cfg || die sed -e "s|/home/httpd/twiki/|${MY_INSTALLDIR}/|g" -i ${MY_INSTALLDIR}/twiki_httpd_conf.txt sed -e "s|http://your.domain.com|http://${VHOST_HOSTNAME}|g s|/home/httpd/twiki|${MY_INSTALLDIR}|g" -i ${MY_INSTALLDIR}/lib/LocalSite.cfg # fix file permissions to avoid warnings chmod 0755 ${MY_INSTALLDIR}/bin/* else echo $1 fi