#!/bin/csh -f

set noglob

foreach file ($*)
	set newfile=`echo "$file" | /bin/sed s/:/-/g`
	if ("$file" != "$newfile") then
		mv $file $newfile
		set file=$newfile
	endif

	if (-d $file) then
		echo directory:`echo $file | /bin/sed 's/_/ /g'`:${file}:none:root
		unset noglob
		(cd $file; /var/ti/util/mirror.index * >! .index)
		set noglob
	else
		echo entry:`echo $file | /bin/sed 's/_/ /g'`:${file}:none:root
	endif
end

exit 0

# From cdemello@MIT.EDU Wed Dec  8 16:13:28 1993
# From: cdemello@MIT.EDU
# Date: Mon, 6 Dec 93 18:09:46 -0500
# To: brlewis@MIT.EDU
# In-Reply-To: Consulting_FYI:[6601]
# Subject: Re: short description of .index file format?
# 
# 
# Hi, the fields are as follows:
# 
# entry:Where's the answer I want?:latex_whats_where:none:oconsult
# 
# 
# the first is whether its an entry or a directory, the second is the
# title for the entry/directory, the third is the file name (assumed to
# be in the same directory as the .index file unless otherwise
# indicated). The fourth field (we always put "none") is the processor
# (Carla said it used to be used for scribe files, etc. so they could be
# processed/read, and the fifth field is the "owner" of the entry (we
# always put oconsult).
# 
# 					o Christina DeMello
# 					o Athena User Accounts
# 					o IS/CSS Consultant
# 					o cdemello@athena
