51318f1756
- install in /usr/local by default - conflict with sysutils/pkg_install
28 lines
508 B
Bash
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
|