#!/bin/sh -e 
#
# $Id: makedebexamples.sh,v 1.2 2002/01/20 14:23:52 rdm Exp $
#
# Writes an examples file entry to debian/root-<pkg>.examples
#
tgtdir=$1 ; shift 
cmndir=$1 ; shift 
prefix=$1 ; shift
etcdir=$1 ; shift
pkg=$1

# Make sure we get a fresh file 
rm -f ${tgtdir}/${pkg}.examples

# See if file exists in common directory 
if [ -f $cmndir/$pkg.examples ] ; then 
    # Prepend each line with a '/', and ignore comment lines
    grep -v "^#" $cmndir/$pkg.examples | \
	sed -e "s,@etcdir@,${etcdir},g" \
	    -e "s,@prefix@,${prefix},g" \
		> ${tgtdir}/${pkg}.examples
fi 

#
# $Log: makedebexamples.sh,v $
# Revision 1.2  2002/01/20 14:23:52  rdm
# Mega patch by Christian Holm concerning the configure, build and
# Debian and RedHat packaging scripts. The configure script has been
# rationalized (introduction of two shell functions to find package
# headers and libraries). Extensive update of the INSTALL writeup,
# including description of all new packages (SapDB, PgSql, etc.).
# More options to the root-config script. Man page for memprobe.
# Big overhaul of the Debian and RedHat packaging scripts, supporting
# the new libraries.
#
# Revision 1.1  2001/04/23 14:11:47  rdm
# part of the debian and redhat build system.
#
#
