Browse Source

Add site generation date to index

spesk1 4 years ago
parent
commit
9863c970ce
1 changed files with 5 additions and 1 deletions
  1. 5 1
      lib/Gsg/Html.pm

+ 5 - 1
lib/Gsg/Html.pm

@@ -40,7 +40,11 @@ sub write_root_index($$$$) {
 	my $logger = shift;
 	write_file("", $index);
 	append_file("<html><body><b>Git Projects</b><br><head><META NAME=\"ROBOTS\" CONTENT=\"NOINDEX, NOFOLLOW\"></head>\n",$index);
-	append_file("<small><i>Statically generated web root for browsing this git server</i></small><br><hr/>\n",$index);
+	append_file("<small><i>Statically generated web root for browsing this git server</i></small><br>\n",$index);
+	my $date_cmd = findBin("date",$logger);
+	my $current_time = `$dateCmd`;
+	chomp $current_time;
+	append_file("<small><i>Generated at $current_time</i></small><br><hr/>\n",$index);
 	
 	my $mkdirCmd = findBin("mkdir",$logger);
 	foreach my $project ( @$project_dirs_ref ) {