openbsd-ports/www/mycalendar/pkg/INSTALL
2003-08-13 09:54:01 +00:00

57 lines
1.0 KiB
Plaintext

#!/bin/sh
# $OpenBSD: INSTALL,v 1.1 2003/08/13 09:54:06 kevlo Exp $
#
# mycalendar installation
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/var/www}
CGI_DIR=${PREFIX}/cgi-bin/calendar
CONFIG_FILE=${PREFIX}/cgi-bin/calendar/appointments.txt
do_notice()
{
echo
echo "+---------------"
echo "| The existing $1 appointments file in $CGI_DIR,"
echo "| have NOT been changed."
echo "+---------------"
echo
}
do_install()
{
touch $CONFIG_FILE
chown www $CONFIG_FILE
echo
echo "+---------------"
echo "| The $1 appointments file have been installed into"
echo "| $CGI_DIR."
echo "+---------------"
echo
}
if [ $# -ne 2 ]; then
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
fi
case $2 in
PRE-INSTALL)
: nothing to pre-install for this port
;;
POST-INSTALL)
if [ -f $CONFIG_FILE ]; then
do_notice $1
else
do_install $1
fi
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0