Annotation of loncom/build/system_dependencies/postscripttest.pl, revision 1.2

1.1       harris41    1: #!/usr/bin/perl
                      2: 
                      3: # postscripttest.pl - script to test for necessary postscript tools on system
                      4: #
1.2     ! harris41    5: # $Id: postscripttest.pl,v 1.1 2002/08/15 16:12:28 harris41 Exp $
1.1       harris41    6: #
                      7: ###
                      8: 
                      9: =pod
                     10: 
                     11: =head1 NAME
                     12: 
                     13: B<postscripttest.pl> - Test for necessary postscript tools on system
                     14: 
                     15: =cut
                     16: 
                     17: # Written to help LON-CAPA (The LearningOnline Network with CAPA)
                     18: #
                     19: # YEAR=2002
                     20: 
                     21: =pod
                     22: 
                     23: =head1 SYNOPSIS
                     24: 
                     25: perl postscripttest.pl
                     26: 
                     27: This script is ordinarily located inside the LON-CAPA source code tree.
                     28: This script is normally invoked by test-related targets inside
                     29: F<loncapa/loncom/build/Makefile>.
                     30: 
                     31: =head1 DESCRIPTION
                     32: 
                     33: This program tests the status of postscript utilities on a LON-CAPA server.
                     34: For instance, the ps2pdf utility is critically important for providing
                     35: the manual in a pdf format.
                     36: 
                     37: =head1 AUTHOR
                     38: 
                     39: This software is distributed under the General Public License,
                     40: version 2, June 1991 (which is the same terms as LON-CAPA).
                     41: 
                     42: This is free software; you can redistribute it and/or modify
                     43: it under the terms of the GNU General Public License as published by
                     44: the Free Software Foundation; either version 2 of the License, or
                     45: (at your option) any later version.
                     46: 
                     47: This software is distributed in the hope that it will be useful,
                     48: but WITHOUT ANY WARRANTY; without even the implied warranty of
                     49: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     50: GNU General Public License for more details.
                     51: 
                     52: You should have received a copy of the GNU General Public License
                     53: along with this software; if not, write to the Free Software
                     54: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
                     55: 
                     56: =cut
                     57: 
                     58: # =================================== Process version information of this file.
1.2     ! harris41   59: my $VERSION = sprintf("%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/);
1.1       harris41   60: 
                     61: print('Running postscripttest.pl, version '.$VERSION.'.'."\n");
                     62: print('(Test for needed utilities like ps2pdf.)'."\n");
                     63: 
                     64: my $ps2pdf_flag=0;
                     65: foreach my $dir (split(/\:/,$ENV{'PATH'})) {
                     66:     next if /^\/home/;
                     67:     if (-x "$dir/ps2pdf") {
                     68: 	$ps2pdf_flag="$dir/ps2pdf";
                     69:     }
                     70: }
                     71: if ($ps2pdf_flag) {
                     72:     print("Checking for ps2pdf...found at ${ps2pdf_flag}.\n");
                     73: }
                     74: else {
                     75:     print("**** ERROR **** Cannot find ps2pdf in the path!\n");
                     76:     exit(1);
                     77: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>