#!/bin/csh

#
# A simple shell script that makes NeXT indexes of a directory with
# the paths munged appropriately.
#
# Automatically makes a link for good measure too.
#

set GopherHome = "/Gopher/IIC"
set Data = "/Gopher/IIC/CSOM Information/MBA Program/Course Descriptions"

cd $GopherHome

mkdir /tmp/.index
ln -s /tmp/.index "$GopherHome/.index"
ixBuild -Vv -f text -i $GopherHome/.index/index.ixif "$Data"
mv /tmp/.index/index.ixif "$Data/.index/"
rm "$GopherHome/.index"

echo "Name=Index of this tree"  >>"$Data/.IndexLink"
echo "Type=7" 			>>"$Data/.IndexLink"
echo "Path=7/$Data" 		>>"$Data/.IndexLink"
echo "Host=+"			>>"$Data/.IndexLink"
echo "Port=+"			>>"$Data/.IndexLink"
