#! /bin/sh

if [ "$1" = ""  -o ! -d /usr/local/lib/dotfile-2.0b5/$1  ]; then

	echo "The folowing modules are installed:"
	cd /usr/local/lib/dotfile-2.0b5
	for file in *; do
		if [ $file != "Generator" ]; then
			echo -n "  $file -- "
			if [ -f $file/info ]; then
				cat $file/info
			else
				echo ""
			fi
		fi
	done
	echo ""
	echo "To start the Dotfile Generator type $0 <module name>"
	echo "Eg. \"$0 emacs\" to configure emacs."
	echo ""
	echo "For more information on the Dotfile Generator or modules for it"
	echo "please refer to the following URL on the World Wide Web:"
	echo "http://www.imada.ou.dk/~blackie/dotfile/"
	echo ""
else
	exec /usr/bin/wish4.1 -f /usr/local/lib/dotfile-2.0b5/Generator/dotfile.tcl /usr/local/lib/dotfile-2.0b5/Generator /usr/local/lib/dotfile-2.0b5/$1 $2
fi

