swh:1:snp:47f1e8bb459169b0feb652a9c3d9cbabd8526d4a
Raw File
Tip revision: 9752ad0bb79f680bca48db7adc45338b298304b0 authored by Junio C Hamano on 22 September 2017, 05:47:41 UTC
Git 2.12.5
Tip revision: 9752ad0
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