blob: 34aa30c5b9ffc617e1519878317c2ae83bed6a6a [file] [log] [blame]
Junio C Hamanoe6fc2342005-08-25 00:28:18 -07001#!/bin/sh
2
3cat <<\EOF
4GIT Howto Index
5===============
6
7Here is a collection of mailing list postings made by various
8people describing how they use git in their workflow.
9
10EOF
11
12for txt
13do
14 title=`expr "$txt" : '.*/\(.*\)\.txt$'`
15 from=`sed -ne '
16 /^$/q
17 /^From:[ ]/{
18 s///
19 s/^[ ]*//
20 s/[ ]*$//
21 s/^/by /
22 p
Junio C Hamanof358c102005-08-26 12:35:51 -070023 }
24 ' "$txt"`
25
26 abstract=`sed -ne '
27 /^Abstract:[ ]/{
28 s/^[^ ]*//
29 x
30 s/.*//
31 x
32 : again
33 /^[ ]/{
34 s/^[ ]*//
35 H
36 n
37 b again
38 }
39 x
40 p
41 q
Junio C Hamanoe6fc2342005-08-25 00:28:18 -070042 }' "$txt"`
Junio C Hamanof358c102005-08-26 12:35:51 -070043
Junio C Hamano8d0991d2005-08-29 22:38:12 -070044 if grep 'Content-type: text/asciidoc' >/dev/null $txt
45 then
46 file=`expr "$txt" : '\(.*\)\.txt$'`.html
47 else
48 file="$txt"
49 fi
50
51 echo "* link:$file[$title] $from
Junio C Hamanof358c102005-08-26 12:35:51 -070052$abstract
53
54"
Junio C Hamanoe6fc2342005-08-25 00:28:18 -070055
56done