diff options
Diffstat (limited to 'devel/php5-phing/files/pear-deinstall.in')
-rw-r--r-- | devel/php5-phing/files/pear-deinstall.in | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/devel/php5-phing/files/pear-deinstall.in b/devel/php5-phing/files/pear-deinstall.in new file mode 100644 index 000000000000..ec8de6093698 --- /dev/null +++ b/devel/php5-phing/files/pear-deinstall.in @@ -0,0 +1,27 @@ +#!/bin/sh +# +# $FreeBSD: /tmp/pcvs/ports/devel/php5-phing/files/pear-deinstall.in,v 1.1 2008-08-16 08:10:35 kuriyama Exp $ +# +# 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 |