freebsd-ports/sysutils/pkg_install-devel/pkg-deinstall
Oliver Eikemeier 51318f1756 - remove sourceforge from MASTER_SITES
- install in /usr/local by default
- conflict with sysutils/pkg_install
2004-01-27 17:36:08 +00:00

28 lines
508 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
PAX=/bin/pax
ECHO_CMD=echo
RM=/bin/rm
BACKUPDIR=/var/backups
PREFIX=${PKG_PREFIX:-/usr/local}
if [ "${PREFIX}" = "/usr" ]; then
MANPREFIX="${PREFIX}/share"
else
MANPREFIX="${PREFIX}"
fi
case $2 in
POST-DEINSTALL)
if [ "${PREFIX}" = "/usr" ]; then
if [ -e "${BACKUPDIR}/pkg_install.tgz" ]; then
${PAX} -r -pe -z -f "${BACKUPDIR}/pkg_install.tgz"
${RM} "${BACKUPDIR}/pkg_install.tgz"
${ECHO_CMD} "===> Base pkg_install restored."
fi
fi
;;
esac