freebsd-ports/devel/pear-PEAR/pkg-deinstall
Thierry Thomas a324ca4ac2 PR ports/77594 has been submitted to fix plist, but this case has
been fixed with the upgrade to 1.3.5.

This fixes two other deinstallation problems: pear2 not found and
several sub-directories (e.g. pear-HTML_Select_Common-1.1_3).

Approved by:	maintainer
2005-02-21 18:05:04 +00:00

25 lines
502 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# Remove package declaration from PEAR's registry.
if [ x$2 != xDEINSTALL ]; then
exit
fi
PKG_NAME=${1%%-[0-9._]*}
PACKAGE=$(echo $PKG_NAME | sed 's/pear-//')
PEAR=${PKG_PREFIX}/bin/pear
PEAR2=${PKG_PREFIX}/bin/pear2
if [ ${PACKAGE} = "PEAR" ] \
|| [ ${PACKAGE} = "Archive_Tar" ] \
|| [ ${PACKAGE} = "Console_Getopt" ] \
|| [ ${PACKAGE} = "XML_RPC" ]; then
PEAR_INSTALLER=${PEAR}
else
PEAR_INSTALLER=${PEAR2}
fi
${PEAR_INSTALLER} uninstall -r -n ${PACKAGE} || true