update parse-descriptor.pl

libdivecomputer is a submodule. Just hardcode the path to descriptor.c.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2019-07-15 11:22:10 -07:00
parent 3e5d60d95a
commit 9b63b6d5e1

View file

@ -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: $!";