# Makefile for data directory.
#
# IRC Services is copyright (c) 1996-2007 Andrew Church.
#     E-mail: <achurch@achurch.org>
# Parts written by Andrew Kempe and others.
# This program is free but copyrighted software; see the file COPYING for
# details.

include ../Makefile.inc
TOPDIR=..

all:	# Nothing to do

install: all $(DATDEST)/helpfiles
	$(INSTALL_DAT) example-ircservices.conf "$(DATDEST)/example-ircservices.conf"
	$(INSTALL_DAT) example-modules.conf "$(DATDEST)/example-modules.conf"

$(DATDEST)/helpfiles:
	$(CP_ALL) helpfiles "$(DATDEST)"
	@set -e ; if [ "$(RUNGROUP)" ] ; then \
		echo 'chgrp -R "$(RUNGROUP)" "$(DATDEST)/helpfiles"' ; \
		chgrp -R "$(RUNGROUP)" "$(DATDEST)/helpfiles" ; \
		echo 'chmod -R 2770 "$(DATDEST)/helpfiles"' ; \
		chmod -R 2770 "$(DATDEST)/helpfiles" ; \
		echo 'find "$(DATDEST)/helpfiles" -type f -exec chmod 660 '\''{}'\'' \;' ; \
		find "$(DATDEST)/helpfiles" -type f -exec chmod 660 '{}' \; ; \
	else \
		echo 'chmod -R 700 "$(DATDEST)/helpfiles"' ; \
		chmod -R 700 "$(DATDEST)/helpfiles" ; \
		echo 'find "$(DATDEST)/helpfiles" -type f -exec chmod 600 '\''{}'\'' \;' ; \
		find "$(DATDEST)/helpfiles" -type f -exec chmod 600 '{}' \; ; \
	fi


syntax highlighted by Code2HTML, v. 0.9.1