mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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:
parent
3e5d60d95a
commit
9b63b6d5e1
1 changed files with 3 additions and 5 deletions
|
@ -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: $!";
|
||||
|
|
Loading…
Reference in a new issue