[LON-CAPA-cvs] cvs: loncom /build help_graphics_converter.pl

bowersj2 lon-capa-cvs@mail.lon-capa.org
Mon, 19 Aug 2002 21:40:55 -0000


bowersj2		Mon Aug 19 17:40:55 2002 EDT

  Modified files:              
    /loncom/build	help_graphics_converter.pl 
  Log:
  Detects absense of ImageMagick during graphics conversion and issues an
  **** ERROR **** if ImageMagick is not installed.
  
  
  
Index: loncom/build/help_graphics_converter.pl
diff -u loncom/build/help_graphics_converter.pl:1.3 loncom/build/help_graphics_converter.pl:1.4
--- loncom/build/help_graphics_converter.pl:1.3	Fri Jul 19 12:56:23 2002
+++ loncom/build/help_graphics_converter.pl	Mon Aug 19 17:40:55 2002
@@ -38,6 +38,15 @@
 mkdir $dirprefix . "gif/", 0755;
 mkdir $dirprefix . "eps/", 0755;
 
+my $convert = `which convert`;
+if ($convert eq '')
+{
+    open LOG, ">> WARNINGS";
+    print LOG "**** ERROR **** ImageMagick is not installed. You must install ImageMagick to use LON-CAPA. Please see your installation instructions.\n";
+    print "**** ERROR **** ImageMagick is not installed. You must install ImageMagick to use LON-CAPA. Please see your installation instructions.\n";
+    exit;
+}
+
 foreach my $file (glob($dirprefix . "png/*.png"))
 {
     my $filename = substr($file, rindex($file, "/") + 1);