<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/local/bin/perl -w
#$baseurl="http://surveys.roe.ac.uk/wsa/pre/";
$baseurl="http://surveys.roe.ac.uk/wsa/";
$baseurl_jsp="http://surveys.roe.ac.uk:8080/wsa/";
$singleFile="";
$singleFile=$ARGV[0];
$noArgs=scalar @ARGV;
print ": $noArgs \n :";
if ($noArgs &gt; 0 ){
system ("cd /home/mar/wsa; ls $singleFile | grep -v end.ht | grep -v bottom | grep -v top.ht &gt; in.dat");
}
else {
system ("cd /home/mar/wsa; ls *.ht | grep -v end.ht | grep -v bottom | grep -v top.ht &gt; in.dat");
}
$filename="in.dat";
#$installdir="/thoth/www/wsa/release/";
$installdir="/thoth/www/wsa/";
#$installdir="/thoth/www/wsa/pre/";

$top="top.html";
$bottom="bottom.html";
$expand_1="expand_1.ht";
$expand_1_txt="";
open (EXPAND,"&lt;$expand_1");
  $expand_1_txt = do { local $/; &lt;EXPAND&gt; }; 
close (EXPAND);
       $expand_1_txt=~s/\$URL./$baseurl/;
       $expand_1_txt=~s/\$JSP./$baseurl_jsp/;
#print "\n $expand_1_txt";

$end="end.html";
#$baseurl="http://surveys.roe.ac.uk/wsa/release/";
#$baseurl="http://surveys.roe.ac.uk/wsa/";

open (TOP,"&lt;top.ht");
open (TOPOUT, "&gt;top.html");
open (TOPE1, "&gt;top_expand_1.html");

    while (&lt;TOP&gt;){
	$line=$_;
        $line=~s/\$URL./$baseurl/;
        $line=~s/\$JSP./$baseurl_jsp/;
        print TOPOUT $line;
        $line=~s/&lt;!-- \$EXPAND_1 --&gt;/$expand_1_txt/;
        print TOPE1 $line;
    }
close (TOP);
close(TOPOUT);
close(TOPE1);



open (BOT,"&lt;bottom.ht");
open (BOTOUT, "&gt;bottom.html");
    while (&lt;BOT&gt;){
	$line=$_;
        $line=~s/\$URL./$baseurl/;
        $line=~s/\$JSP./$baseurl_jsp/;
        print BOTOUT $line;
    }
close (BOT);
close(BOTOUT);



open (WORK,$filename);

while (&lt;WORK&gt;){
$line=$_;
@fields=split(/&amp;/,$line);
$htfile=$fields[0];
$date=$fields[1];
chomp($htfile);
#chomp($date);
($mdate)=(stat($htfile))[9];
($sec,$min,$hour,$mday,$mon,$year,$a1,$a2,$a3) = localtime ($mdate);
$mon++;#Perl counts months 0-11, so increment for humans
    $year=$year+1900;
$thedate = "$mday/$mon/$year";
$date=$thedate;



print "$htfile $date\n";
$httemp=$htfile."temp";
print "$httemp\n";
$htmlfile="$htfile"."ml";
print "$htmlfile\n";
if ($htfile =~ /crdedits.ht/) {
system("cat top_expand_1.html $htfile &gt; $httemp");
}
else {
system("cat $top $htfile &gt; $httemp");
}
system(" cat $httemp $bottom &gt;$htmlfile");

open (HTMLFILE, "&gt;&gt;$htmlfile");
print HTMLFILE "&lt;br&gt;$date&lt;/font&gt;&lt;/i&gt;&lt;p&gt;\n";


#print HTMLFILE "&lt;a href=\"http://www.mirror.ac.uk/services/validator/\"&gt;&lt;img border=0 ";
#    print HTMLFILE "SRC=\"http://www-wfau.roe.ac.uk/sss/images/vh40.gif\"";
#    print HTMLFILE " ALT=\"Valid HTML 4.0!\" HEIGHT=31 WIDTH=88&gt;&lt;/A&gt;";



print HTMLFILE "&lt;/center&gt; &lt;/table&gt; &lt;/BODY&gt; \n";
print HTMLFILE "&lt;/html&gt;";


close (HTMLFILE);
system("/usr/local/bin/scp  $htmlfile mar\@thoth:$installdir.");

}

#system("/usr/local/bin/scp  menu.jsp mar\@thoth:/thoth/webapps/wsa/.");
#system("/usr/local/bin/scp  menu1.jsp mar\@thoth:/thoth/webapps/wsa/.");
#system("/usr/local/bin/scp  menu2.jsp mar\@thoth:/thoth/webapps/wsa/.");
if ($noArgs ==0 ){
#system("/usr/local/bin/scp  pixel.jsp mar\@thoth:/thoth/webapps/wsa/.");
system("/usr/local/bin/scp  top.html mar\@thoth:/thoth/webapps/wsa/.");
system("/usr/local/bin/scp  bottom.html mar\@thoth:/thoth/webapps/wsa/.");
#system("/usr/local/bin/scp  top.html mar\@thoth:/thoth/webapps/wsa/top.jsp");
#system("/usr/local/bin/scp  bottom.html mar\@thoth:/thoth/webapps/wsa/bottom.jsp");
system(" cat bottom.html end.ht &gt; bottom_end.html");
system("/usr/local/bin/scp  bottom_end.html mar\@thoth:/thoth/webapps/wsa/.");
system("/usr/local/bin/scp style.css mar\@thoth:/thoth/www/wsa/.");
system("/usr/local/bin/scp configurestyles.js mar\@thoth:$installdir.");
system("/usr/local/bin/scp browserversion.js mar\@thoth:$installdir/.");
system("/usr/local/bin/scp default.css mar\@thoth:$installdir.");
system("/usr/local/bin/scp pubs.html mar\@thoth:$installdir/pubs/ukidss/index.html");

}
close (WORK);
#system("/usr/local/bin/scp -l top.html cosaxp6:public_html/.");
#system("/usr/local/bin/scp -l bottom.html cosaxp6:public_html/.");
#system("/usr/local/bin/scp -l SQL.html cosaxp6:public_html/sql.html");
exit;










</pre></body></html>