add ability to generate index.html files for the directories which are processed
this is because most browsers are truncating our long build file names. git-svn-id: svn://10.0.0.236/trunk@104680 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
ac54e182e9
commit
53aa8257b4
@ -28,8 +28,8 @@
|
||||
# complete rewrite by Ken Estes, Mail.com (kestes@staff.mail.com).
|
||||
# Contributor(s):
|
||||
|
||||
# $Revision: 1.1 $
|
||||
# $Date: 2001-08-29 16:07:08 $
|
||||
# $Revision: 1.2 $
|
||||
# $Date: 2001-10-05 22:05:10 $
|
||||
# $Author: kestes%walrus.com $
|
||||
# $Name: not supported by cvs2svn $
|
||||
|
||||
@ -250,6 +250,39 @@ sub purge_dirs {
|
||||
}
|
||||
|
||||
|
||||
|
||||
sub print_dirs_index {
|
||||
my @dir_list = @_;
|
||||
|
||||
|
||||
foreach $dir (@dir_list) {
|
||||
|
||||
my $index_file = "$dir/index.html";
|
||||
open (INDEX, ">>$index_file") ||
|
||||
die("Could not open indexfile: $index_file\n");
|
||||
|
||||
print INDEX "<html>\n";
|
||||
print INDEX "<pre>\n";
|
||||
my @file_set = time_sorted_dir_files($dir);
|
||||
|
||||
foreach $file_name (@file_set) {
|
||||
my $basename = basename($file_name);
|
||||
my $href = "<A HREF=\"./$basename\" >$basename</A>";
|
||||
print INDEX "$href ".localtime(get_mtime($file_name))."\n";
|
||||
|
||||
} # foreach $file_name
|
||||
|
||||
print INDEX "</pre>\n";
|
||||
print INDEX "</html>\n";
|
||||
close(INDEX) ||
|
||||
die("Could not close indexfile: $index_file\n");
|
||||
|
||||
|
||||
} # foreach $dir
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
sub set_static_vars {
|
||||
|
||||
# This functions sets all the static variables which are often
|
||||
@ -400,7 +433,8 @@ sub parse_args {
|
||||
get_env();
|
||||
parse_args();
|
||||
|
||||
purge_dirs(@ARCHIVE_DIRS);
|
||||
purge_dirs(@ARCHIVE_DIRS);
|
||||
print_dirs_index(@ARCHIVE_DIRS);
|
||||
|
||||
exit 0;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user