X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=Documentation%2Fhowto-index.sh;h=34aa30c5b9ffc617e1519878317c2ae83bed6a6a;hb=7fb23e6083dbefa8eb4c554d8b2cd5a6292b2df4;hp=3a6afb9f6ab7607577016a98ca27e7035b656ce6;hpb=e6fc2346c17b9a4ee274d509429042eec9c14db5;p=git.git diff --git a/Documentation/howto-index.sh b/Documentation/howto-index.sh index 3a6afb9f..34aa30c5 100755 --- a/Documentation/howto-index.sh +++ b/Documentation/howto-index.sh @@ -20,8 +20,37 @@ do s/[ ]*$// s/^/by / p + } + ' "$txt"` + + abstract=`sed -ne ' + /^Abstract:[ ]/{ + s/^[^ ]*// + x + s/.*// + x + : again + /^[ ]/{ + s/^[ ]*// + H + n + b again + } + x + p + q }' "$txt"` - echo " - * link:$txt[$title] $from" + + if grep 'Content-type: text/asciidoc' >/dev/null $txt + then + file=`expr "$txt" : '\(.*\)\.txt$'`.html + else + file="$txt" + fi + + echo "* link:$file[$title] $from +$abstract + +" done