better INSTALL script taken from redhat_base

This commit is contained in:
brad 2001-02-14 22:39:49 +00:00
parent 9dae541e46
commit 6a66229feb

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.2 2000/10/01 03:41:14 brad Exp $
# $OpenBSD: INSTALL,v 1.3 2001/02/14 22:39:49 brad Exp $
#
# Pre/post-installation setup of freebsd_lib
@ -11,12 +11,27 @@ PREFIX=${PKG_PREFIX:-/usr/local/emul/freebsd}
# Function: tell the user what s/he needs to do to use the port just installed
#
do_notice()
do_notice_top()
{
echo
echo "+---------------"
echo "|"
}
do_notice_link()
{
echo "| /emul/freebsd already exists but it's not a symlink to $PREFIX."
echo "|"
echo "| To make this port active you must make /emul/freebsd a symlink to"
echo "| $PREFIX."
echo "|"
}
do_notice_bottom()
{
echo "| Installation of $1 complete. See compat_freebsd(8)"
echo "| for more information."
echo "|"
echo "+---------------"
echo
}
@ -32,12 +47,21 @@ fi
#
case $2 in
PRE-INSTALL)
install -d -o root -g bin -m 755 /emul
install -d -o root -g bin -m 755 /emul
install -d -o root -g bin -m 755 $PREFIX
ln -sf $PREFIX /emul/freebsd
;;
POST-INSTALL)
do_notice $1
do_notice_top $1
if [ -e /emul/freebsd ]; then
if [ x`readlink /emul/freebsd` != x"$PREFIX" ]; then
do_notice_link
fi
else
ln -sf $PREFIX /emul/freebsd
fi
do_notice_bottom $1
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2