#!/usr/local/bin/perl

if (-r "index.html") 
{
exec("echo index.html exists!");
}

$TODAY=`date`;

open(PSDIR, "ls -t | grep -v index.html |") || die "No files\n";
open(INDEX,"> index.html");

$PWD=`pwd`;chop $PWD;
$PWD=~s/\/infomall\/tenants\/pulsar\/htdoc-ro//g;

        print INDEX "<TITLE>index of $PWD</TITLE> \n";
        print INDEX "<!-- DO NOT EDIT!! run ~/bin/makeindexhtml.pl --> \n\
";


	print INDEX "<H4>index of $PWD</h4><HR> \n";
print INDEX "last updated $TODAY<HR>\n";
	print INDEX "<pre>";



FILE:
while (<PSDIR>) {
	chop $_;
	   $B = `ls -l -s $_`;
	$thesize = substr($B, 0, 4);
	$theday = substr($B, 51, 2);

            @line = split(' ',$B);
	    $size = $line[0];
	$month = $line[6];
	$time=$line[8];
       $B=$_;
	    
	    print INDEX 
	    "$theday-$month $time\t ($thesize kb)\t";
	print INDEX "<a href=\"$B\">$B</a>\t\n";
	 
	close(GIFINDEX);

	next FILE;
}
        print INDEX "</PRE>\n";
        print INDEX "<HR>Generated by
Rob's makeindexhtml.pl\n";

















