summaryrefslogtreecommitdiff
path: root/www/geeklog/INSTALL
blob: da12f746527cf1a9e8b7d5650a8ccffe5212415c (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
33
# $NetBSD: INSTALL,v 1.3 2007/05/20 15:56:44 taca Exp $

APACHE_GROUP="@APACHE_GROUP@"
GEEKLOG_PUBDIR="@GEEKLOG_PUBDIR@"
GEEKLOG_ADMIN_DIR="@GEEKLOG_ADMIN_DIR@"
GEEKLOG_TMPL_SUB="@GEEKLOG_TMPL_SUB@"
GEEKLOG_TMPL_DIR="@GEEKLOG_TMPL_DIR@"
PAX="@PAX@"

case ${STAGE} in
POST-INSTALL)
	(cd ${GEEKLOG_ADMIN_DIR}; ${PAX} -rw . ${GEEKLOG_PUBDIR}/admin)
	(cd ${GEEKLOG_TMPL_DIR}
	${FIND} ${GEEKLOG_TMPL_SUB} -type d -print | \
		while read d; do
			dir="${GEEKLOG_PUBDIR}/$d"
			if ${TEST} ! -d ${dir}; then
				${MKDIR} ${dir}
				${CHGRP} ${APACHE_GROUP} ${dir}
				${CHMOD} 0775 ${dir}
			fi
		done
	${FIND} ${GEEKLOG_TMPL_SUB} -type f -print | \
		while read f; do
			file="${GEEKLOG_PUBDIR}/$f"
			if ${TEST} ! -f ${file}; then
				${CP} -p ${f} ${file}
				${CHGRP} ${APACHE_GROUP} ${file}
				fi
			done
	)
	;;
esac