# $NetBSD: DEINSTALL,v 1.5 2009/05/26 14:19:29 taca Exp $ GEEKLOG_PUBDIR="${PREFIX}/@GEEKLOG_PUB@" GEEKLOG_DIR="${PREFIX}/@GEEKLOG_BASE@" GEEKLOG_TMPL_DIR="${PREFIX}/@GL_TMPL@" GEEKLOG_TMPL_SUB="@GL_TMPL_SUB@" case ${STAGE} in DEINSTALL) (cd ${GEEKLOG_DIR}; \ if [ ! -s logs/error.log ]; then rm -f logs/error.log fi ) (cd ${GEEKLOG_PUBDIR}; ${RM} -fr admin) (cd ${GEEKLOG_TMPL_DIR} ${FIND} ${GEEKLOG_TMPL_SUB} -type f -print | \ while read f; do file="${GEEKLOG_PUBDIR}/$f" if ${TEST} -f ${file} -a -f ${f} && \ ${CMP} -s ${file} ${f}; then ${RM} -f ${file} fi done cd ${GEEKLOG_PUBDIR} ${FIND} -d ${GEEKLOG_TMPL_SUB} -type d -print | while read d; do ${RMDIR} ${d} 2>/dev/null done ) ;; esac