Git fork

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>

authored by

Todd Zullinger and committed by
Junio C Hamano
41c793ea 2a1530a9

+7 -7
+7 -7
Documentation/howto/howto-index.sh
··· 9 9 10 10 EOF 11 11 12 - for txt 12 + for adoc 13 13 do 14 - title=$(expr "$txt" : '.*/\(.*\)\.txt$') 14 + title=$(expr "$adoc" : '.*/\(.*\)\.adoc$') 15 15 from=$(sed -ne ' 16 16 /^$/q 17 17 /^From:[ ]/{ ··· 21 21 s/^/by / 22 22 p 23 23 } 24 - ' "$txt") 24 + ' "$adoc") 25 25 26 26 abstract=$(sed -ne ' 27 27 /^Abstract:[ ]/{ ··· 39 39 x 40 40 p 41 41 q 42 - }' "$txt") 42 + }' "$adoc") 43 43 44 - if grep 'Content-type: text/asciidoc' >/dev/null $txt 44 + if grep 'Content-type: text/asciidoc' >/dev/null $adoc 45 45 then 46 - file=$(expr "$txt" : '\(.*\)\.txt$').html 46 + file=$(expr "$adoc" : '\(.*\)\.adoc$').html 47 47 else 48 - file="$txt" 48 + file="$adoc" 49 49 fi 50 50 51 51 echo "* link:howto/$(basename "$file")[$title] $from