#!/bin/sh # # $FreeBSD: ports/ports-mgmt/pkg_install-devel/pkg-deinstall,v 1.3 2006/08/04 12:34:48 erwin Exp $ # PAX=/bin/pax ECHO_CMD=echo RM=/bin/rm BACKUPDIR=/var/backups PREFIX=${PKG_PREFIX:-/usr/local} if [ "${PREFIX}" = "/usr" ]; then MANPREFIX="${TARGETDIR}/share" else MANPREFIX="${TARGETDIR}" 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