[LON-CAPA-cvs] cvs: loncom /interface printout.pl
sakharuk
lon-capa-cvs@mail.lon-capa.org
Fri, 06 Feb 2004 14:16:39 -0000
sakharuk Fri Feb 6 09:16:39 2004 EDT
Modified files:
/loncom/interface printout.pl
Log:
Added link to zip file.
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.44 loncom/interface/printout.pl:1.45
--- loncom/interface/printout.pl:1.44 Thu Feb 5 13:38:12 2004
+++ loncom/interface/printout.pl Fri Feb 6 09:16:39 2004
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc.
#
-# $Id: printout.pl,v 1.44 2004/02/05 18:38:12 sakharuk Exp $
+# $Id: printout.pl,v 1.45 2004/02/06 14:16:39 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -322,11 +322,18 @@
print "LaTeX file $texfile was not created successfully";
}
}
+print "<br />";
if ($number_of_files>1) {
- my $statement='';
+ my $zipfile=$texfile[0];
+ $zipfile=~s/\.tex/\.zip/;
+ my $statement="zip $zipfile";
foreach my $file (@texfile) {
-
+ $file=~s/\.tex/.\pdf/;
+ $statement.=' '.$file;
}
+ system("$statement");
+ $zipfile=~s/\/home\/httpd//;
+ print "<br /> <a href=\"$zipfile\">Your ZIP file is here</a>";
}
&Close_StatWin();