1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

Clean up the /var/db/portindex directory (if it is empty) on

deinstallation.

Submitted by:	swills (via jenkins.freebsd.org)
This commit is contained in:
Matthew Seaman 2014-05-05 20:13:39 +00:00
parent 213ca65426
commit c1617bf425
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=353039
2 changed files with 26 additions and 2 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= FreeBSD-Portindex
PORTVERSION= 3.4
PORTREVISION= 1
CATEGORIES= ports-mgmt perl5
MASTER_SITES= http://www.infracaninophile.co.uk/portindex/
PKGNAMEPREFIX= p5-
@ -37,13 +38,13 @@ CACHE_MODE?= 0775
CFG_FILE= portindex.cfg
SUB_FILES+= pkg-install
SUB_FILES+= pkg-install pkg-deinstall
SUB_LIST+= CACHE_DIR=${CACHE_DIR} \
CACHE_OWNER=${CACHE_OWNER} \
CACHE_GROUP=${CACHE_GROUP} \
CACHE_MODE=${CACHE_MODE}
post-install: install-conf
post-install: install-conf
install-conf:
cd ${WRKSRC} ; \

View File

@ -0,0 +1,23 @@
#!/bin/sh
#
# $FreeBSD$
#
PATH=/usr/sbin:/usr/bin:/bin ; export PATH
CACHE_DIR=%%CACHE_DIR%%
case $2 in
# Remove the cache directory, but only if it is empty.
POST-DEINSTALL)
if [ ! -d ${CACHE_DIR} ] ; then
rmdir ${CACHE_DIR} >/dev/null 2>&1 || true
fi
;;
esac
#
# That's All Folks!
#