diff options
Diffstat (limited to 'devel/pear/pear-deinstall.in')
-rw-r--r-- | devel/pear/pear-deinstall.in | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/devel/pear/pear-deinstall.in b/devel/pear/pear-deinstall.in new file mode 100644 index 000000000000..de1886f48c4a --- /dev/null +++ b/devel/pear/pear-deinstall.in @@ -0,0 +1,21 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Remove package declaration from PEAR's registry. + +if [ x$2 != xDEINSTALL ]; then + exit +fi + +PKG_NAME=${1%%-[0-9._]*} +CHANNEL=%%PEAR_CHANNEL%% +PEAR=${PKG_PREFIX}/bin/pear + +if [ -z "$CHANNEL" ]; then + PACKAGE=$(echo $PKG_NAME | sed "s/pear-//") + ${PEAR} uninstall -r -n ${PACKAGE} || true +else + PACKAGE=$(echo $PKG_NAME | sed "s/pear-${CHANNEL}-//") + ${PEAR} uninstall -r -n ${CHANNEL}/${PACKAGE} || true +fi |