Make it possible to generate 29tsoc ebooks
[project-aon.git] / common / scripts / gbtoxhtml.pl
index 194c30b..fdf721a 100755 (executable)
@@ -24,12 +24,23 @@ my $XALAN_JAR  = '/usr/share/java/xalan2.jar';
 my $RM         = '/bin/rm';
 my $CHMOD      = '/bin/chmod';
 
+# Check that all the binaries are were want them
+
+my @BINARIES;
+push @BINARIES, ($RXP, $CP, $MV, $TAR, $ZIP, $BZIP2, $JAVA, $XALAN_JAR, $RM, $CHMOD);
+
+foreach (@BINARIES) {
+    if ( ! -e $_ ) {
+        die "$PROGRAM_NAME: Cannot find binary '".$_."'. Please install it.\n";
+    }
+}
+
 ###
 
 my $bookCode     = '';
 my $metaFile     = '';
 my $bookXML      = '';
-my $xhtmlXSL     = 'common/xsl/xhtml.xsl';
+my $xhtmlXSL     = 'common/xsl/xhtml-dever.xsl';
 my $language     = 'en';
 
 my $verbose = 0;
@@ -57,7 +68,7 @@ while( $#ARGV > -1 ) {
 }
 
 if( $bookCode eq '' ) { die "Unspecified book code\n$USAGE"; }
-if( $metaFile eq '' ) { $metaFile = "$language/.publisher/rules/standard"; }
+if( $metaFile eq '' ) { $metaFile = "$language/.publisher/rules/dever"; }
 if( $bookXML eq '' ) { $bookXML = "$language/xml/$bookCode.xml"; }
 if( $xhtmlXSL eq '' ) { die "Unspecified XSL transformation file\n$USAGE"; }