aboutsummaryrefslogtreecommitdiffstats
path: root/devel/pear/pear-deinstall.in
blob: de1886f48c4a263bf56de93d6d039c594104de62 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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