diff options
Diffstat (limited to 'scripts/documentation-file-ref-check')
-rwxr-xr-x | scripts/documentation-file-ref-check | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/scripts/documentation-file-ref-check b/scripts/documentation-file-ref-check index 5d775ca7469b..ff16db269079 100755 --- a/scripts/documentation-file-ref-check +++ b/scripts/documentation-file-ref-check | |||
@@ -165,13 +165,22 @@ foreach my $ref (keys %broken_ref) { | |||
165 | 165 | ||
166 | # usual reason for breakage: DT file moved around | 166 | # usual reason for breakage: DT file moved around |
167 | if ($ref =~ /devicetree/) { | 167 | if ($ref =~ /devicetree/) { |
168 | my $search = $new; | 168 | # usual reason for breakage: DT file renamed to .yaml |
169 | $search =~ s,^.*/,,; | ||
170 | $f = qx(find Documentation/devicetree/ -iname "*$search*") if ($search); | ||
171 | if (!$f) { | 169 | if (!$f) { |
172 | # Manufacturer name may have changed | 170 | my $new_ref = $ref; |
173 | $search =~ s/^.*,//; | 171 | $new_ref =~ s/\.txt$/.yaml/; |
172 | $f=$new_ref if (-f $new_ref); | ||
173 | } | ||
174 | |||
175 | if (!$f) { | ||
176 | my $search = $new; | ||
177 | $search =~ s,^.*/,,; | ||
174 | $f = qx(find Documentation/devicetree/ -iname "*$search*") if ($search); | 178 | $f = qx(find Documentation/devicetree/ -iname "*$search*") if ($search); |
179 | if (!$f) { | ||
180 | # Manufacturer name may have changed | ||
181 | $search =~ s/^.*,//; | ||
182 | $f = qx(find Documentation/devicetree/ -iname "*$search*") if ($search); | ||
183 | } | ||
175 | } | 184 | } |
176 | } | 185 | } |
177 | 186 | ||