#! /bin/sh # # $NetBSD: INSTALL,v 1.2 2001/11/06 10:58:03 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" CHMOD="@CHMOD@" CP="@CP@" ECHO="@ECHO@" MKDIR="@MKDIR@" TR="@TR@" SAMPLECONFDIR=${PKG_PREFIX}/share/examples/@PKGBASE@ CONFDIR=@SURFRAW_SYSCONFDIR@ MAKEDIRS="${CONFDIR}" CONFFILES=" \ ${SAMPLECONFDIR}/surfraw.conf ${CONFDIR}/surfraw.conf : \ ${SAMPLECONFDIR}/surfraw_elvi.list ${CONFDIR}/surfraw_elvi.list \ " case ${STAGE} in PRE-INSTALL) ;; POST-INSTALL) for dir in __dummy ${MAKEDIRS} do if [ "${dir}" != "__dummy" ] then ${MKDIR} ${dir} fi done ${ECHO} "Installing configuration files:" ${ECHO} ${CONFFILES} | ${TR} ":" "\012" | while read SAMPLEFILE FILE do if [ -f ${FILE} ] then ${ECHO} " ${FILE} already exists" else ${ECHO} " ${FILE}" ${CP} ${SAMPLEFILE} ${FILE} ${CHMOD} 644 ${FILE} fi done ${CAT} << EOF =========================================================================== You may wish to customize the following files: EOF ${ECHO} ${CONFFILES} | ${TR} ":" "\012" | while read SAMPLEFILE FILE do ${ECHO} " ${FILE}" done ${CAT} << EOF =========================================================================== EOF ;; *) ${ECHO} "Unexpected argument: ${STAGE}" exit 1 ;; esac exit 0