doc: update howto-index.sh for .adoc extensions

The .txt extensions were changed to .adoc in 1f010d6bdf (doc: use .adoc extension for AsciiDoc files, 2025-01-20). This left broken links in the generated howto-index.html. Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Todd Zullinger committed Mar 1, 2025 at 10:36 UTC 41c793eae900e632dbc73ec7f900ea1e7d38aa92
1 file changed +7 -7
Documentation/howto/howto-index.sh
+7 -7
@@ -9,9 +9,9 @@ people describing how they use Git in their workflow.
9
10 EOF
11
12 -for txt
12 +for adoc
13 do
14 - title=$(expr "$txt" : '.*/\(.*\)\.txt$')
14 + title=$(expr "$adoc" : '.*/\(.*\)\.adoc$')
15 from=$(sed -ne '
16 /^$/q
17 /^From:[ ]/{
@@ -21,7 +21,7 @@ do
21 s/^/by /
22 p
23 }
24 - ' "$txt")
24 + ' "$adoc")
25
26 abstract=$(sed -ne '
27 /^Abstract:[ ]/{
@@ -39,13 +39,13 @@ do
39 x
40 p
41 q
42 - }' "$txt")
42 + }' "$adoc")
43
44 - if grep 'Content-type: text/asciidoc' >/dev/null $txt
44 + if grep 'Content-type: text/asciidoc' >/dev/null $adoc
45 then
46 - file=$(expr "$txt" : '\(.*\)\.txt$').html
46 + file=$(expr "$adoc" : '\(.*\)\.adoc$').html
47 else
48 - file="$txt"
48 + file="$adoc"
49 fi
50
51 echo "* link:howto/$(basename "$file")[$title] $from