X-Git-Url: http://git.projectaon.org/?p=project-aon.git;a=blobdiff_plain;f=common%2Fscripts%2Fgbtoxhtml-simple.pl;fp=common%2Fscripts%2Fgbtoxhtml-simple.pl;h=09dc2a5ebb0334e2af6d7494ca884f7c32acef9e;hp=fc1df5334efcc7962458a5f669e63ba3d8ea1e0e;hb=99ff0c0408c069caca0f76d799eb6fd9646abf6b;hpb=4d7a25316ff7dc8cc39391b71de8b6a22e67041b diff --git a/common/scripts/gbtoxhtml-simple.pl b/common/scripts/gbtoxhtml-simple.pl index fc1df53..09dc2a5 100755 --- a/common/scripts/gbtoxhtml-simple.pl +++ b/common/scripts/gbtoxhtml-simple.pl @@ -18,7 +18,7 @@ unless( -e $RXP && -x $RXP ) { # try somewhere else $RXP = '/usr/local/bin/rxp'; } -my $ZIP = '/usr/bin/zip -q'; +my $ZIP = '/usr/bin/zip'; my $JAVA = '/usr/bin/java'; # latest binary download names the relevant jar "xalan.jar" # older installations may have "xalan2.jar" @@ -28,6 +28,17 @@ unless( -e $XALAN_JAR ) { $XALAN_JAR = '/usr/share/java/xalan2.jar'; } +# Check that all the binaries are were want them + +my @BINARIES; +push @BINARIES, ($RXP, $ZIP, $JAVA, $XALAN_JAR); + +foreach (@BINARIES) { + if ( ! -e $_ ) { + die "$PROGRAM_NAME: Cannot find binary '".$_."'. Please install it.\n"; + } +} + ### my $bookCode = ''; @@ -122,7 +133,7 @@ if( $bookXML =~ m{^([-\w\@./]+)$} ) { my $bookPath = "$outPath${FILENAME_SEPARATOR}${bookCode}"; print qx{$JAVA -classpath "$XALAN_JAR" org.apache.xalan.xslt.Process -IN "${bookXML}" -XSL "${xhtmlXSL}" -OUT "${bookPath}.htm" -PARAM use-illustrators "$rulesHash{'use-illustrators'}"}; - print qx{$ZIP $bookPath.zip $bookPath.htm}; + print qx{$ZIP -q $bookPath.zip $bookPath.htm}; } print "Success\n" if $verbose;