2004-01-26 01:07:11 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PAX=/bin/pax
|
|
|
|
ECHO_CMD=echo
|
|
|
|
RM=/bin/rm
|
|
|
|
BACKUPDIR=/var/backups
|
|
|
|
|
2004-01-27 18:36:08 +01:00
|
|
|
PREFIX=${PKG_PREFIX:-/usr/local}
|
2004-01-26 01:07:11 +01:00
|
|
|
if [ "${PREFIX}" = "/usr" ]; then
|
2006-08-04 14:34:50 +02:00
|
|
|
MANPREFIX="${TARGETDIR}/share"
|
2004-01-26 01:07:11 +01:00
|
|
|
else
|
2006-08-04 14:34:50 +02:00
|
|
|
MANPREFIX="${TARGETDIR}"
|
2004-01-26 01:07:11 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
case $2 in
|
|
|
|
POST-DEINSTALL)
|
2004-01-27 18:36:08 +01:00
|
|
|
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
|
2004-01-26 01:07:11 +01:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|