Skip to content

Commit 08ca1d4

Browse files
gllghrdscho
authored andcommitted
Fix list inclusions after .adoc renaming
This updates scripts/update-docs.rb to account for the change in extension (.txt -> .adoc) when processing include directives during the creation of the 'en' manual pages.
1 parent 66de03f commit 08ca1d4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

script/update-docs.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ def index_doc(filter_tags, doc_list, get_content)
377377
end
378378
generated = cmd_list.keys.inject({}) do |list, category|
379379
links = cmd_list[category].map do |cmd, attr|
380-
cmd_file = tag_files.detect { |ent| ent.first == "Documentation/#{cmd}.txt" }
380+
cmd_file = tag_files.detect { |ent| ent.first == "Documentation/#{cmd}.#{ext}" }
381381
next unless cmd_file
382382

383383
content = get_content.call(cmd_file[1])
@@ -387,7 +387,7 @@ def index_doc(filter_tags, doc_list, get_content)
387387
"linkgit:#{cmd}[#{section}]::\n\t#{attr == 'deprecated' ? '(deprecated) ' : ''}#{match[1]}\n"
388388
end
389389
end
390-
list.merge!("Documentation/cmds-#{category}.txt" => links.compact.join("\n"))
390+
list.merge!("Documentation/cmds-#{category}.#{ext}" => links.compact.join("\n"))
391391
end
392392

393393
tools = tag_files.select { |ent| ent.first =~ /^mergetools\// }.map do |entry|
@@ -400,8 +400,8 @@ def index_doc(filter_tags, doc_list, get_content)
400400
end
401401

402402
can_merge, can_diff = tools.transpose.map(&:join)
403-
generated["Documentation/mergetools-diff.txt"] = can_diff
404-
generated["Documentation/mergetools-merge.txt"] = can_merge
403+
generated["Documentation/mergetools-diff.#{ext}"] = can_diff
404+
generated["Documentation/mergetools-merge.#{ext}"] = can_merge
405405

406406
get_content_f = proc do |name|
407407
content_file = tag_files.detect { |ent| ent.first == name }

0 commit comments

Comments
 (0)