ports/devel/pear-PHPUnit3/files/pear-deinstall.in
Martin Wilke da63860723 - Unbreak
- Got this port working again after making some minor changes to
  the devel/pear port to support alternate download locations.

Submitted by:	Greg Larkin <glarkin@sourcehosting.net>
Approved by:	maintainer (via icq)
2007-10-29 17:01:20 +00:00

27 lines
574 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# Remove package declaration from PEAR's registry and optionally delete
# a non-standard channel.
if [ x$2 != xDEINSTALL -a x$2 != xPOST-DEINSTALL ]; then
exit
fi
PKG_NAME=${1%%-[0-9._]*}
PACKAGE=$(echo $PKG_NAME | sed 's/pear-//')
PEAR=${PKG_PREFIX}/bin/pear
CHANNEL=%%CHANNEL%%
if [ "$2" = "DEINSTALL" ]; then
if [ "x${CHANNEL}" != "x" ]; then
${PEAR} uninstall -r -n ${CHANNEL}/${PACKAGE} || true
else
${PEAR} uninstall -r -n ${PACKAGE} || true
fi
else
if [ "x${CHANNEL}" != "x" ]; then
${PEAR} channel-delete ${CHANNEL}
fi
fi