1stMud4.5.3/
1stMud4.5.3/backup/
1stMud4.5.3/bin/
1stMud4.5.3/bin/extras/
1stMud4.5.3/data/i3/
1stMud4.5.3/doc/1stMud/
1stMud4.5.3/doc/Diku/
1stMud4.5.3/doc/MPDocs/
1stMud4.5.3/doc/Rom/
1stMud4.5.3/notes/
#!/bin/sh

if [ "$#" != "2" ]; then
	echo "Syntax: $0 'file extension' 'path to template.h'"
	exit 1
fi

if [ "$2" = "" ]; then
	$2=.
fi

if [ ! -r $2/template.h ]; then
	echo "Cannot find template.h which is required."
	exit 1
fi

for filex in *$1
do
	mv $filex $filex.bak
	cat $2/template.h > $filex
	cat $filex.bak >> $filex
	rm -f $filex.bak
	echo "Added header to $filex..."
done

exit 0