openbsd-ports/misc/screen/pkg/INSTALL
brad 0ab84e9980 - don't need to install the sample screen screencap file anymore
- don't mention it durring INSTALL run either
--
Brought to my attention by: fries@
2001-05-06 00:46:50 +00:00

65 lines
1.4 KiB
Plaintext

#!/bin/sh
# $OpenBSD: INSTALL,v 1.6 2001/05/06 00:46:51 brad Exp $
#
# Pre/post-installation setup of screen
# 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_FILE=${SYSCONFDIR}/screenrc
SAMPLE_CONFIG_DIR=$PREFIX/share/examples/screen
do_notice()
{
echo
echo "+---------------"
echo "| The file $CONFIG_FILE exists on your system. It has"
echo "| NOT been updated. Please look at the file "
echo "| $SAMPLE_CONFIG_DIR/screenrc-sample"
echo "| and add any desired (but missing) entries into your"
echo "| current $CONFIG_FILE"
echo "+---------------"
echo
}
do_install()
{
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/screenrc-sample $CONFIG_FILE
echo
echo "+---------------"
echo "| The file $CONFIG_FILE has been created on your system."
echo "| You may want to verify/edit its contents"
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 [ -e $CONFIG_FILE ]; then
do_notice
else
do_install
fi
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0