Make it possible to add a verbose level in commands to see issues when executing...
[project-aon.git] / common / scripts / gbtolatex.pl
index 2b37c7e..c182a01 100755 (executable)
@@ -30,7 +30,7 @@ my $USE_ILLUSTRATORS  = "";
 #
 # my $XMLPROC = "xalan";
 # my $XMLPROC = "/usr/local/bin/xmlto";
-my $XMLPROC = "xsltproc";
+my $XMLPROC = "/usr/bin/xsltproc";
 # my $JAVA = "/cygdrive/c/WINDOWS/java.exe";
 my $JAVA = "/usr/bin/java"; 
 my $EXTRAPARMS =""; 
@@ -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 ];