Vanilla Development Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS update: Vanilla/robots
Date: Thursday July 22, 1999 @ 10:47
Author: ahn
Update of /home/netrek/cvsroot/Vanilla/robots
In directory cvs.castle.real-time.com:/var/tmp/cvs-serv14763/robots
Modified Files:
end_tourney.pl
Log Message:
Minor patch to end_tourney to run ltd_dump and optionally dump stats
into subdirectories.
****************************************
Index: Vanilla/robots/end_tourney.pl
diff -u Vanilla/robots/end_tourney.pl:1.6 Vanilla/robots/end_tourney.pl:1.7
--- Vanilla/robots/end_tourney.pl:1.6 Thu Jul 22 10:10:48 1999
+++ Vanilla/robots/end_tourney.pl Thu Jul 22 10:47:55 1999
@@ -27,6 +27,12 @@
# a trailing slash.
#
#$dropdir = "/ls/home/tom/public_html/results";
+#
+# Uncomment this if $dropdir is defined and stats should be dumped
+# into subdirectories within $dropdir.
+#
+#$dropsub = 1;
+#
foreach $argument ( @ARGV ) {
if ( $argument eq "-register" ) {
@@ -46,6 +52,8 @@
$outputfile = "pwstats.html";
}
+ system("./tools/ltd_dump .players." . $id . " > $inputfile");
+
open (INPUT,"$inputfile");
open (OUTPUT,">$outputfile");
@@ -60,7 +68,18 @@
if ( $dropdir ) {
if ( -d $dropdir ) {
- system("cp -f $outputfile $dropdir/$outputfile");
+ if ( $dropsub ) {
+ system("mkdir $dropdir/$id");
+ system("cp -f $outputfile $dropdir/$id/pwstats.html");
+ system("cp -f $logfile $dropdir/$id/INL_log");
+ system("cp -f $inputfile $dropdir/$id/ltd_dump.txt");
+ system("gzip -9f $dropdir/$id/INL_log");
+ system("gzip -9f $dropdir/$id/ltd_dump.txt");
+ system("chmod 755 $dropdir/$id");
+ system("chmod 644 $dropdir/$id/*");
+ } else {
+ system("cp -f $outputfile $dropdir/$outputfile");
+ }
} else {
print STDERR "Dropdir " , $dropdir , " is not a directory!\n";
}