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