#!/bin/sh
# $OpenBSD: INSTALL,v 1.1.1.1 2002/06/29 13:39:51 espie Exp $
#
# Pre/post-installation setup of postfix

PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFDIR=${SYSCONFDIR}
SAMPLECONF=${PREFIX}/share/examples/cvsgraph

# verify proper execution
#
if [ $# -ne 2 ]; then
    echo "usage: $0 distname POST-INSTALL" >&2
    exit 1
fi

# Verify/process the command
#
case $2 in
	PRE-INSTALL)
	;;
	POST-INSTALL)
	if [ -f $CONFDIR/cvsgraph.conf ]; then
		echo ""
		echo "+---------------"
		echo "| The existing $1 configuration file $CONFDIR/cvsgraph.conf,"
		echo "| have NOT been changed.  You may want to compare it to the"
		echo "| current sample file, $SAMPLECONF/cvsgraph.conf,"
		echo "| and update your configuration as needed."
 	  	echo "+---------------"
		echo ""
 	  else
		# Install config file.
		install -o root -g wheel -m 644 $SAMPLECONF/cvsgraph.conf $CONFDIR
		echo ""
		echo "+---------------"
		echo "| The $1 configuration file $CONFDIR/cvsgraph.conf,"
		echo "| have been installed.  Please view this file and change"
		echo "| the configuration to meet your needs."
		echo "+---------------"
		echo ""
 	   fi
	;;
	*)
	echo "Usage: `basename $0` distname POST-INSTALL" >&2
	exit 1
	;;
esac

exit 0
