Make new rules file standard for DOT and SVG
[project-aon.git] / common / scripts / gbtosvg.pl
index f996ccb..9af49b9 100755 (executable)
@@ -1,8 +1,9 @@
-#!/usr/bin/env perl -w
+#!/usr/bin/env perl
 #
 # gbtosvg.pl
 
 use strict;
+use warnings;
 
 delete @ENV{qw(PATH IFS CDPATH ENV BASH_ENV)}; # clean house for taint mode
 
@@ -16,6 +17,19 @@ my $JAVA       = '/usr/bin/java';
 my $XALAN_JAR  = '/usr/share/java/xalan2.jar';
 my $DOT        = '/usr/local/bin/dot';
 
+
+# Check that all the binaries are were want them
+
+my @BINARIES;
+push @BINARIES, ($RXP, $JAVA, $XALAN_JAR, $DOT);
+
+foreach (@BINARIES) {
+    if ( ! -e $_ ) {
+            die "$PROGRAM_NAME: Cannot find binary '".$_."'. Please install it.\n";
+    }
+}
+
+
 ###
 
 my $bookCode     = '';
@@ -54,7 +68,7 @@ while( $#ARGV > -1 ) {
 
 if( $bookCode eq '' ) { die "Unspecified book code\n$USAGE"; }
 if( $bookXML eq '' ) { $bookXML = "$language/xml/$bookCode.xml"; }
-if( $metaFile eq '' ) { $metaFile = "$language/.publisher/rules/standard"; }
+if( $metaFile eq '' ) { $metaFile = "$language/.publisher/rules/dever"; }
 
 if( -e $metaFile && -f $metaFile && -r $metaFile ) {
     open( META, '<', $metaFile )