HTTP cleanup
[git.git] / Documentation / howto-index.sh
index 3a6afb9..34aa30c 100755 (executable)
@@ -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