2005-08-25 15:28:18 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
cat <<\EOF
|
2013-01-22 03:16:20 +08:00
|
|
|
Git Howto Index
|
2005-08-25 15:28:18 +08:00
|
|
|
===============
|
|
|
|
|
|
|
|
Here is a collection of mailing list postings made by various
|
2013-01-22 03:17:53 +08:00
|
|
|
people describing how they use Git in their workflow.
|
2005-08-25 15:28:18 +08:00
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
for txt
|
|
|
|
do
|
2014-04-17 01:29:45 +08:00
|
|
|
title=$(expr "$txt" : '.*/\(.*\)\.txt$')
|
|
|
|
from=$(sed -ne '
|
2005-08-25 15:28:18 +08:00
|
|
|
/^$/q
|
|
|
|
/^From:[ ]/{
|
|
|
|
s///
|
|
|
|
s/^[ ]*//
|
|
|
|
s/[ ]*$//
|
|
|
|
s/^/by /
|
|
|
|
p
|
2005-08-27 03:35:51 +08:00
|
|
|
}
|
2014-04-17 01:29:45 +08:00
|
|
|
' "$txt")
|
2005-08-27 03:35:51 +08:00
|
|
|
|
2014-04-17 01:29:45 +08:00
|
|
|
abstract=$(sed -ne '
|
2005-08-27 03:35:51 +08:00
|
|
|
/^Abstract:[ ]/{
|
|
|
|
s/^[^ ]*//
|
|
|
|
x
|
|
|
|
s/.*//
|
|
|
|
x
|
|
|
|
: again
|
|
|
|
/^[ ]/{
|
|
|
|
s/^[ ]*//
|
|
|
|
H
|
|
|
|
n
|
|
|
|
b again
|
|
|
|
}
|
|
|
|
x
|
|
|
|
p
|
|
|
|
q
|
2014-04-17 01:29:45 +08:00
|
|
|
}' "$txt")
|
2005-08-27 03:35:51 +08:00
|
|
|
|
2005-08-30 13:38:12 +08:00
|
|
|
if grep 'Content-type: text/asciidoc' >/dev/null $txt
|
|
|
|
then
|
2014-04-17 01:29:45 +08:00
|
|
|
file=$(expr "$txt" : '\(.*\)\.txt$').html
|
2005-08-30 13:38:12 +08:00
|
|
|
else
|
|
|
|
file="$txt"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "* link:$file[$title] $from
|
2005-08-27 03:35:51 +08:00
|
|
|
$abstract
|
|
|
|
|
|
|
|
"
|
2005-08-25 15:28:18 +08:00
|
|
|
|
|
|
|
done
|