summaryrefslogtreecommitdiffstats
path: root/scripts/parse-descriptor.pl
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-05-03 07:02:44 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-05-03 07:10:22 -0700
commit15c20a3c721471496edf5816a01bd5579a09f03e (patch)
tree0fe704587a084c8116c9e7575b24b1c21af3e1ac /scripts/parse-descriptor.pl
parenta784b15cb87b98b0c0a66e025760449941375747 (diff)
downloadsubsurface-15c20a3c721471496edf5816a01bd5579a09f03e.tar.gz
Update supported dive computers
I clearly forgot to do that prior to the last release - and of course we needed to add special handling for Seabaer. And to make it more obvious that the files themselves shouldn't be edited, let's add some comment to that extend to the two files as well. Closes #375 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'scripts/parse-descriptor.pl')
-rwxr-xr-xscripts/parse-descriptor.pl14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/parse-descriptor.pl b/scripts/parse-descriptor.pl
index b1729a608..6bde935f0 100755
--- a/scripts/parse-descriptor.pl
+++ b/scripts/parse-descriptor.pl
@@ -21,6 +21,14 @@ if ($infi !~ /.*descriptor.c/) {
open(my $fh, "<", $infi) || croak "can't open $infi: $!";
open(STDOUT, ">", $outfi) || croak "can't open $outfi: $!";
+my $commentStart = "# ";
+my $commentEnd = "";
+if ($type eq "html") {
+ $commentStart = "<!-- ";
+ $commentEnd = " -->";
+}
+printf("%s This file is automatically generated, please edit scripts/parse-descriptor.pl%s\n", $commentStart, $commentEnd);
+
my $lastVend = "";
my $lastMod = "";
my @descriptors = ();
@@ -37,6 +45,9 @@ foreach (@sortedDescriptors) {
if ($vend eq $lastVend) {
printf(", %s", $mod);
} else {
+ if ($lastVend lt "Seabaer" && $vend gt "Seabaer") {
+ printf("</li></ul>\n </dd>\n <dt>Seabaer</dt><dd><ul>\n\t <li>T1, H3, HUDC");
+ }
if ($lastVend lt "Uemis" && $vend gt "Uemis") {
printf("</li></ul>\n </dd>\n <dt>Uemis</dt><dd><ul>\n\t <li>Zürich SDA");
}
@@ -50,6 +61,9 @@ foreach (@sortedDescriptors) {
if ($vend eq $lastVend) {
printf(", %s", $mod);
} else {
+ if ($lastVend lt "Seabaer" && $vend gt "Seabaer") {
+ printf("\nSeabaer: T1, H3, HUDC");
+ }
if ($lastVend lt "Uemis" && $vend gt "Uemis") {
printf("\nUemis: Zürich SDA");
}