From 4d7a25316ff7dc8cc39391b71de8b6a22e67041b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Javier=20Fern=C3=A1ndez-Sanguino?= Date: Wed, 3 Apr 2013 18:47:35 +0000 Subject: [PATCH] Check that all binaries needed are installed before running git-svn-id: https://projectaon.org/data/trunk@2221 f6f3e2d7-ff33-0410-aaf5-b4bee2cdac11 --- common/scripts/gbtolatex.pl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/common/scripts/gbtolatex.pl b/common/scripts/gbtolatex.pl index 2b37c7e..0cf1e7e 100755 --- a/common/scripts/gbtolatex.pl +++ b/common/scripts/gbtolatex.pl @@ -39,6 +39,18 @@ $EXTRAPARMS=$ENV{'XMLPARMS'} if defined($ENV{'XMLPARMS'}); unless( $ARGV[ 0 ] ) { die "Usage:\n\t${PROGRAM_NAME} book-code [LANGUAGE] [OUTPUTFILE]\n"; } +# Check that all the binaries are were want them + +my @BINARIES; +push @BINARIES, ($XMLPROC, $JAVA); + +foreach (@BINARIES) { + if ( ! -e $_ ) { + die "$PROGRAM_NAME: Cannot find binary '".$_."'. Please install it.\n"; + } +} + + print "Reminder:\n\tDid you uncomment the LaTeX special character\n\tdeclarations in the book's XML file?\n"; my $bookCode = $ARGV[ 0 ]; -- 2.34.1