openbsd-ports/databases/sqsh/pkg/INSTALL
jcs 966fdc0e5a Update to sqsh-2.1
Reference new homepage
2001-12-23 23:27:22 +00:00

65 lines
1.4 KiB
Plaintext

#!/bin/sh
# $OpenBSD: INSTALL,v 1.1 2001/12/23 23:27:23 jcs Exp $
# exit on errors, use a sane path and install prefix
#
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_DIR=${SYSCONFDIR}
SAMPLE_CONFIG_DIR=$PREFIX/share/examples/sqsh
do_notice()
{
echo
echo "+---------------"
echo "| The existing $1 configuration file in $CONFIG_DIR has"
echo "| NOT been changed. You may want to compare it to the current"
echo "| sample file, $SAMPLE_CONFIG_DIR/global.sqshrc,"
echo "| and update your configuration as needed."
echo "+---------------"
echo
}
do_install()
{
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/global.sqshrc \
$CONFIG_DIR/sqshrc
echo
echo "+---------------"
echo "| The $1 configuration file, $CONFIG_DIR/sqshrc,"
echo "| has been installed. Please view this file and change"
echo "| the configuration to meet your needs."
echo "+---------------"
echo
}
# verify proper execution
#
if [ $# -ne 2 ]; then
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
fi
# Verify/process the command
#
case $2 in
PRE-INSTALL)
: nothing to pre-install for this port
;;
POST-INSTALL)
if [ -f $CONFIG_DIR/sqshrc ]; then
do_notice $1
else
do_install $1
fi
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0