mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +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:
|
# 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
|
# depending on suffix of the outfile it creates the right content for
|
||||||
# either a text file or and html file
|
# either a text file or and html file
|
||||||
use Carp;
|
use Carp;
|
||||||
|
|
||||||
#set command line arguments
|
#set command line arguments
|
||||||
my ($infi, $outfi) = @ARGV;
|
my $outfi = $ARGV[0];
|
||||||
my ($type) = $outfi =~ /\.([^.]+)$/;
|
my ($type) = $outfi =~ /\.([^.]+)$/;
|
||||||
|
|
||||||
if ($infi !~ /.*descriptor.c/) {
|
my $infi = "libdivecomputer/src/descriptor.c";
|
||||||
croak "run as $ARGV[0] <path to descriptor.c> <outputfile>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
open(my $fh, "<", $infi) || croak "can't open $infi: $!";
|
open(my $fh, "<", $infi) || croak "can't open $infi: $!";
|
||||||
open(STDOUT, ">", $outfi) || croak "can't open $outfi: $!";
|
open(STDOUT, ">", $outfi) || croak "can't open $outfi: $!";
|
||||||
|
|
Loading…
Reference in a new issue