Junio C Hamano | e6fc234 | 2005-08-25 00:28:18 -0700 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | cat <<\EOF |
Thomas Ackermann | 48a8c26 | 2013-01-21 20:16:20 +0100 | [diff] [blame] | 4 | Git Howto Index |
Junio C Hamano | e6fc234 | 2005-08-25 00:28:18 -0700 | [diff] [blame] | 5 | =============== |
| 6 | |
| 7 | Here is a collection of mailing list postings made by various |
Thomas Ackermann | 2de9b71 | 2013-01-21 20:17:53 +0100 | [diff] [blame] | 8 | people describing how they use Git in their workflow. |
Junio C Hamano | e6fc234 | 2005-08-25 00:28:18 -0700 | [diff] [blame] | 9 | |
| 10 | EOF |
| 11 | |
| 12 | for txt |
| 13 | do |
Elia Pinto | f25f5e6 | 2014-04-16 10:29:45 -0700 | [diff] [blame] | 14 | title=$(expr "$txt" : '.*/\(.*\)\.txt$') |
| 15 | from=$(sed -ne ' |
Junio C Hamano | e6fc234 | 2005-08-25 00:28:18 -0700 | [diff] [blame] | 16 | /^$/q |
| 17 | /^From:[ ]/{ |
| 18 | s/// |
| 19 | s/^[ ]*// |
| 20 | s/[ ]*$// |
| 21 | s/^/by / |
| 22 | p |
Junio C Hamano | f358c10 | 2005-08-26 12:35:51 -0700 | [diff] [blame] | 23 | } |
Elia Pinto | f25f5e6 | 2014-04-16 10:29:45 -0700 | [diff] [blame] | 24 | ' "$txt") |
Junio C Hamano | f358c10 | 2005-08-26 12:35:51 -0700 | [diff] [blame] | 25 | |
Elia Pinto | f25f5e6 | 2014-04-16 10:29:45 -0700 | [diff] [blame] | 26 | abstract=$(sed -ne ' |
Junio C Hamano | f358c10 | 2005-08-26 12:35:51 -0700 | [diff] [blame] | 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 |
Elia Pinto | f25f5e6 | 2014-04-16 10:29:45 -0700 | [diff] [blame] | 42 | }' "$txt") |
Junio C Hamano | f358c10 | 2005-08-26 12:35:51 -0700 | [diff] [blame] | 43 | |
Junio C Hamano | 8d0991d | 2005-08-29 22:38:12 -0700 | [diff] [blame] | 44 | if grep 'Content-type: text/asciidoc' >/dev/null $txt |
| 45 | then |
Elia Pinto | f25f5e6 | 2014-04-16 10:29:45 -0700 | [diff] [blame] | 46 | file=$(expr "$txt" : '\(.*\)\.txt$').html |
Junio C Hamano | 8d0991d | 2005-08-29 22:38:12 -0700 | [diff] [blame] | 47 | else |
| 48 | file="$txt" |
| 49 | fi |
| 50 | |
| 51 | echo "* link:$file[$title] $from |
Junio C Hamano | f358c10 | 2005-08-26 12:35:51 -0700 | [diff] [blame] | 52 | $abstract |
| 53 | |
| 54 | " |
Junio C Hamano | e6fc234 | 2005-08-25 00:28:18 -0700 | [diff] [blame] | 55 | |
| 56 | done |