#!/usr/bin/perl
$site_number	=	"00";

print	"VA010205\n";
print	"$ENV{'passwd_upsite'}\n";
print	"bin\n\n";

open(NEWER,">>newer");

$_	=	<>;
start:
while(!eof)	{
	if	(/\> \.\/(.+):/)	{
		$dirname	=	"$1";
		if	($dirname	eq	".work/")	{	next;	}
		$_	=	<>;
		if	(/\> \.\/(.+):/)	{	next;	}

		print	"mkdir /$dirname\n";
		print	"cd /$dirname\n";
		print	"lcd $ENV{'HOME'}/web/$site_number/$dirname\n";
		next start;
	}	elsif	(/\> -a.....\s(........)\s(.+\s.+)\s(.+)$/)	{
#			> -a--rw-    25892 1997-07-05 00:58:24 index.html
		&newer_out($1,$2,$dirname,$3);
#		&dirrecog_put;
	}
	$_	=	<>;
}
close(NEWER);


print	"asc\nasc\nls\n";
print	"quit\n";

#------
sub	newer_out	{
	local($ss,$dd,$dn,$fn)	=	@_;
	$ss	=~	s/\s/0/g;
	if	($dn	ne	"")	{	$dn	=	"/$dn";	}
	$dd	=~	s/(.*)-(.*)-(.*)/UTC ADy00$1m$2d$3/;
	print(NEWER	"	<DT><TT>$ss $dd </TT><A HREF=\"..$dn/$fn\">..$dn/$fn\ @l</A>\n");
	print(NEWER	"		<DD>\n");
	print	"put $fn\n";
}
