mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-27 05:10:36 +00:00
51318f1756
- install in /usr/local by default - conflict with sysutils/pkg_install
29 lines
508 B
Bash
29 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
|