]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/howto-index.sh
path.c: clarify trie_find()'s in-code comment
[thirdparty/git.git] / Documentation / howto-index.sh
CommitLineData
e6fc2346
JH
1#!/bin/sh
2
3cat <<\EOF
48a8c26c 4Git Howto Index
e6fc2346
JH
5===============
6
7Here is a collection of mailing list postings made by various
2de9b711 8people describing how they use Git in their workflow.
e6fc2346
JH
9
10EOF
11
12for txt
13do
f25f5e61
EP
14 title=$(expr "$txt" : '.*/\(.*\)\.txt$')
15 from=$(sed -ne '
e6fc2346
JH
16 /^$/q
17 /^From:[ ]/{
18 s///
19 s/^[ ]*//
20 s/[ ]*$//
21 s/^/by /
22 p
f358c10f 23 }
f25f5e61 24 ' "$txt")
f358c10f 25
f25f5e61 26 abstract=$(sed -ne '
f358c10f
JH
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
f25f5e61 42 }' "$txt")
f358c10f 43
8d0991d7
JH
44 if grep 'Content-type: text/asciidoc' >/dev/null $txt
45 then
f25f5e61 46 file=$(expr "$txt" : '\(.*\)\.txt$').html
8d0991d7
JH
47 else
48 file="$txt"
49 fi
50
51 echo "* link:$file[$title] $from
f358c10f
JH
52$abstract
53
54"
e6fc2346
JH
55
56done