aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/parse-descriptor.pl
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-07-15 11:22:10 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-07-15 11:22:10 -0700
commit9b63b6d5e1816be1f0bb6db5f14ea420c6a12efb (patch)
treead0d8b3816a390ac3e18a0290daa3d24a1ad36a4 /scripts/parse-descriptor.pl
parent3e5d60d95a7cf4f45722dfbf61c09fde0da855cb (diff)
downloadsubsurface-9b63b6d5e1816be1f0bb6db5f14ea420c6a12efb.tar.gz
update parse-descriptor.pl
libdivecomputer is a submodule. Just hardcode the path to descriptor.c. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'scripts/parse-descriptor.pl')
-rwxr-xr-xscripts/parse-descriptor.pl8
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/parse-descriptor.pl b/scripts/parse-descriptor.pl
index 6bde935f0..bd27f8354 100755
--- a/scripts/parse-descriptor.pl
+++ b/scripts/parse-descriptor.pl
@@ -4,19 +4,17 @@
#
# Usage:
#
-# parse-descriptor.pl <path to libdivecomputer/src/descriptor.c> <outfile>
+# parse-descriptor.pl <outfile>
#
# depending on suffix of the outfile it creates the right content for
# either a text file or and html file
use Carp;
#set command line arguments
-my ($infi, $outfi) = @ARGV;
+my $outfi = $ARGV[0];
my ($type) = $outfi =~ /\.([^.]+)$/;
-if ($infi !~ /.*descriptor.c/) {
- croak "run as $ARGV[0] <path to descriptor.c> <outputfile>\n";
-}
+my $infi = "libdivecomputer/src/descriptor.c";
open(my $fh, "<", $infi) || croak "can't open $infi: $!";
open(STDOUT, ">", $outfi) || croak "can't open $outfi: $!";