1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
#!/bin/sh
# Copyright 1999, 2000, 2001 (c) Thomas Erskine <@@AUTHOR@@>
# See the COPYRIGHT file with the distribution.
# fixup - do standard substitutions on the specified file
# $Id: fixup,v 1.11 2001/08/28 15:22:24 remstats Exp $
# - - - Version History - - -
# $Revision: 1.11 $
# - - - Setup - - -
if [ $# != 1 ] ; then
echo >&2 "usage: $0 file"
exit 1
fi
if [ ! -f fixup.config ] ; then
echo >&2 "$0: missing fixup.config file"
exit 2
fi
if [ -f VERSION ] ; then
VERSION=`cat VERSION`
else
echo >&2 "$0: missing VERSION file"
exit 3
fi
if [ -f BESTAVAILABLEVERSION ] ; then
BESTAVAILABLEVERSION=`cat BESTAVAILABLEVERSION`
else
echo >&2 "$0: missing BESTAVAILABLEVERSION file"
exit 3
fi
DATE=`date`
. ./fixup.config
sed \
-e "s#@@PERL@@#$PERL#g" \
-e "s#@@PERLOPTS@@#$PERLOPTS#g" \
-e "s#@@PERLCGIOPTS@@#$PERLCGIOPTS#g" \
-e "s#@@INSTALLDIR@@#$INSTALLDIR#g" \
-e "s#@@BINDIR@@#$BINDIR#g" \
-e "s#@@ETCDIR@@#$ETCDIR#g" \
-e "s#@@LIBDIR@@#$LIBDIR#g" \
-e "s#@@CONFIGDIR@@#$CONFIGDIR#g" \
-e "s#@@RRDLIBDIR@@#$RRDLIBDIR#g" \
-e "s#@@RRDCGI@@#$RRDCGI#g" \
-e "s#@@DATADIR@@#$DATADIR#g" \
-e "s#@@ERRORLOGDIR@@#$ERRORLOGDIR#g" \
-e "s#@@HTMLDIR@@#$HTMLDIR#g" \
-e "s#@@HTMLURL@@#$HTMLURL#g" \
-e "s#@@WEBMASTER@@#$WEBMASTER#g" \
-e "s#@@ALERTEMAIL@@#$ALERTEMAIL#g" \
-e "s#@@REMSTATSPORT@@#$REMSTATSPORT#g" \
-e "s#@@VERSION@@#$VERSION#g" \
-e "s#@@BESTAVAILABLEVERSION@@#$BESTAVAILABLEVERSION#g" \
-e "s#@@SENDMAIL@@#$SENDMAIL#g" \
-e "s#@@OURSITEEMAIL@@#$OURSITEEMAIL#g" \
-e "s#@@DATEPROG@@#$DATEPROG#g" \
-e "s#@@DATE@@#$DATE#g" \
-e "s#@@OWNER@@#$OWNER#g" \
-e "s#@@GROUP@@#$GROUP#g" \
-e "s#@@DIRMODE@@#$DIRMODE#g" \
-e "s'@@DEBUG@@'$DEBUG'" \
-e "s#@@AUTHOR@@#thomas.erskine@sourceworks.com#g" \
-e "s#@@SRCURL@@#http://remstats.sourceforge.net/release/#g" \
-e "s#@@RRDTOOLHOME@@#http://ee-staff.ethz.ch/~oetiker/webtools/rrdtool#g" \
-e "s#@@RRDTOOLLOGO@@#rrdtool.gif#g" \
$1
|