pkgsrc/pkgtools/pkg_install/INSTALL

19 lines
316 B
Text

#!/bin/sh
#
# $NetBSD: INSTALL,v 1.3 2008/04/02 13:23:31 jlam Exp $
PKGNAME="$1"
STAGE="$2"
PKG_DBDIR="@PKG_DBDIR@"
MKDIR="@MKDIR@"
case ${STAGE} in
PRE-INSTALL)
[ -d ${PKG_DBDIR} ] || ${MKDIR} ${PKG_DBDIR}
;;
POST-INSTALL)
[ -f ${PKG_DBDIR}/pkgdb.byfile.db ] || ${PKG_PREFIX}/sbin/pkg_admin rebuild
;;
esac