History

scripts: get_abi.pl: prevent duplicated file names

The same filename may exist on multiple directories within ABI. Create separate entries at the internal database for each of them.

Mauro Carvalho Chehab committed 6 years ago

Commit a4ea67b1 parent a16ab141 file · +10 −5Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/get_abi.pl+10−5
@@ -65,7 +65,10 @@ sub parse_abi { · 64 unmodified lines
6565 my $name = $file;
6666 $name =~ s,.*/,,;
6767
68− my $nametag = "File $name";
68+ my $fn = $file;
69+ $fn =~ s,Documentation/ABI/,,;
70+
71+ my $nametag = "File $fn";
6972 $data{$nametag}->{what} = "File $name";
7073 $data{$nametag}->{type} = "File";
7174 $data{$nametag}->{file} = $name;
@@ -320,16 +323,18 @@ sub output_rest { · 248 unmodified lines
320323 my $fileref = "abi_file_".$path;
321324
322325 if ($type eq "File") {
323− my $bar = $w;
324− $bar =~ s/./-/g;
325−
326326 print ".. _$fileref:\n\n";
327− print "$w\n$bar\n\n";
328327 } else {
329328 print "Defined on file :ref:`$f <$fileref>`\n\n";
330329 }
331330 }
332331
332+ if ($type eq "File") {
333+ my $bar = $w;
334+ $bar =~ s/./-/g;
335+ print "$w\n$bar\n\n";
336+ }
337+
333338 my $desc = "";
334339 $desc = $data{$what}->{description} if (defined($data{$what}->{description}));
335340 $desc =~ s/\s+$/\n/;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t