blob: 4810c2049e34794574fe3377782bd53b2e16000a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# $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
|