From a4c3bd0c18d02eedde304a0a911bf8f398d72948 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Javier=20Fern=C3=A1ndez-Sanguino?= Date: Wed, 3 Apr 2013 18:45:08 +0000 Subject: [PATCH] Check that all binaries needed are installed before running git-svn-id: https://projectaon.org/data/trunk@2220 f6f3e2d7-ff33-0410-aaf5-b4bee2cdac11 --- common/scripts/gbtoepub.pl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/common/scripts/gbtoepub.pl b/common/scripts/gbtoepub.pl index 5b5d572..cd25611 100755 --- a/common/scripts/gbtoepub.pl +++ b/common/scripts/gbtoepub.pl @@ -21,6 +21,17 @@ 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 $EPUB_MIMETYPE = 'application/epub+zip'; -- 2.17.1