Staging
v0.8.1
swh:1:snp:c5feb7ee9221a3820c8879e85e8a18470c0b3afa
Raw File
Tip revision: 872354dcb3ce5f34f7ddb12d2c89d26a1ea4daf0 authored by Junio C Hamano on 27 June 2008, 00:11:21 UTC
GIT 1.5.4.6
Tip revision: 872354d
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