mktar: Use `wc` instead of `du` in summary message
[sunny256-utils.git] / git-cmark
blobf3a8fc9d03cbecc5dfcacac592132402145ab10c
1 #!/bin/sh
3 #==============================================================================
4 # git-cmark
5 # File ID: bb0ba9cc-7c24-11e9-826b-4f45262dc9b5
7 # Convert the output from "git log" to Commonmark (Markdown).
9 # Author: Øyvind A. Holm <sunny@sunbase.org>
10 # License: GNU General Public License version 2 or later.
11 #==============================================================================
13 progname=git-cmark
14 VERSION=0.1.1
16 if test "$1" = "-h" -o "$1" = "--help"; then
17 cat <<END
19 Convert the output from "git log" to Commonmark (Markdown).
21 Usage: $progname [-h|--help|args to git log]
23 Option:
25 -h, --help
26 Show this help.
28 All other options and arguments are sent to "git log".
30 Examples:
32 $progname | cmark | lynx -stdin
33 $progname --name-status --since=1.year | cmark >x.html; firefox x.html
35 END
36 exit 0
39 git log "$@" | \
40 perl -pe '
41 s/^commit/-----\n\n commit/;
42 s/^([^ -])/ $1/;
43 s/^ //;
44 s/ +$//;
47 # vim: set ts=8 sw=8 sts=8 noet fo+=w tw=79 fenc=UTF-8 :