Staging
v0.8.1
swh:1:snp:c5feb7ee9221a3820c8879e85e8a18470c0b3afa
Raw File
Tip revision: 46774a81f9d6ca4d230d33757afe9dd07bfe398b authored by Junio C Hamano on 29 October 2005, 21:35:11 UTC
GIT 0.99.9
Tip revision: 46774a8
howto-index.sh
#!/bin/sh

cat <<\EOF
GIT Howto Index
===============

Here is a collection of mailing list postings made by various
people describing how they use git in their workflow.

EOF

for txt
do
	title=`expr "$txt" : '.*/\(.*\)\.txt$'`
	from=`sed -ne '
	/^$/q
	/^From:[ 	]/{
		s///
		s/^[ 	]*//
		s/[ 	]*$//
		s/^/by /
		p
	}
	' "$txt"`

	abstract=`sed -ne '
	/^Abstract:[ 	]/{
		s/^[^ 	]*//
		x
		s/.*//
		x
		: again
		/^[ 	]/{
			s/^[ 	]*//
			H
			n
			b again
		}
		x
		p
		q
	}' "$txt"`

	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
back to top