template.sh

1stMud/src/config/template.sh · 392 B

From the archive 1stmud-4.5.2.tar.gz

Download the archive   « Back to the archive contents

#!/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

Site Stats

Snippets: 1791
Codebases: 571