[LON-CAPA-cvs] cvs: loncom /interface printout.pl
sakharuk
lon-capa-cvs@mail.lon-capa.org
Thu, 08 Jan 2004 19:50:47 -0000
sakharuk Thu Jan 8 14:50:47 2004 EDT
Modified files:
/loncom/interface printout.pl
Log:
Bug 2521 (The eps conversion in construction space does not appear to work) is fixed. See londefdef.pm too.
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.40 loncom/interface/printout.pl:1.41
--- loncom/interface/printout.pl:1.40 Mon Oct 20 14:34:20 2003
+++ loncom/interface/printout.pl Thu Jan 8 14:50:47 2004
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc.
#
-# $Id: printout.pl,v 1.40 2003/10/20 18:34:20 sakharuk Exp $
+# $Id: printout.pl,v 1.41 2004/01/08 19:50:47 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -70,13 +70,18 @@
my $noteps;
foreach $not_eps (@content_of_file) {
if ($not_eps ne '') {
+ $not_eps=~s|\/\.\/|\/|g;
my $eps_f = $not_eps;
$eps_f =~ s/\.[^.]*$/\.eps/i;
- $_ = $eps_f;
- m/\/home\/httpd\/html\/res\/(.+)/;
- $eps_f = '/home/httpd/prtspool/'.$1;
+ if ($eps_f=~/\/home\/([^\/]+)\/public_html\//) {
+ $eps_f=~s/\/home\/([^\/]+)\/public_html/$1/;
+ $eps_f = '/home/httpd/prtspool/'.$eps_f;
+ } else {
+ $eps_f=~m/\/home\/httpd\/html\/res\/(.+)/;
+ $eps_f = '/home/httpd/prtspool/'.$1;
+ }
my $path=$eps_f;
- $path=~s/\/([^\/]+)\.eps$//;
+ $path=~s/\/([^\/]+)\.eps$//;
File::Path::mkpath($path,0,0777);
my $image = Image::Magick->new;
$not_eps =~ s/^\s+//;