#!/bin/sh

set -e

package=namazu2

. /usr/share/debconf/confmodule

CFG=/etc/namazu/cgidirs

if [ "$1" = "configure" ]; then

	db_get namazu2/install
	PLACE=$RET

	echo $PLACE > $CFG
	if [ ! -z "$PLACE" -a "x$PLACE" != "x" ]; then
		for d in $PLACE; do
			echo "copying to $d ..."
			if [ ! -d $d ]; then
				install -d $d
			fi
			cp -a /usr/lib/cgi-bin/namazu.cgi $d/
		done
	fi
fi	

#DEBHELPER#
