#!/bin/csh
#
# 	Create a 'proto' file for use with mkproto from the directory structure
# of files specified.
#
# NOTE: This sctipt does NOT work with special files, and the protection/modes
# are all hard-wired.
#
if ($?LEVEL) then
	set level = `expr $LEVEL + 1`
else
	set level=0
	echo "d--777 3 1"
endif
foreach i ($*)
	repeat $level echo -n "	"
	test -d $i
	if ($status) then
		echo "$i:t	---777 3 1 $i"
	else
		echo "$i:t	d--777 3 1"
		setenv LEVEL $level
		Mkproto $i/*
	endif
end
repeat $level echo -n "	"
echo '$'
setenv LEVEL $level
if ($level == 0) then
	unsetenv LEVEL
endif
