git.iko.soy/typeable/pandoc
on master help sign in
typeable/pandoc/tools/changelog-helper.sh
30 lines 1.3 kB history raw
1#!/bin/sh
2# generate preliminary list of changes since changelog
3# was last modified
5lastmod=`git log -n1 --format=oneline changelog.md | awk '{print $1;}'`
6files=`git ls-tree -r master --name-only | grep --invert-match '^test\/\|^data\/docx\/\|^data\/odt\/\|^data\/pptx\/\|^citeproc\/\|^data\/translations\/'`
7for x in $files
8do
9 echo $x 1>&2
10 commits=`git log -n1 $lastmod..HEAD $x`
11 if [ ! -z "$commits" ]
12 then
13 if echo $x | grep -q "src\/.*\.hs"
14 then
15 file=`echo $x | sed -e 's/src\///' | sed -e 's/\//\./g' | sed -e 's/\.hs$//'`
16 else
17 file=$x
18 fi
19 echo " * $file"
20 git log --pretty=format:'%n%w(78,4,6)+ %s (%aN)%n%n%w(78,6,6)%b%n' "$lastmod..HEAD" "$x"
21 fi
22done
23echo "test/" 1>&2
24git log --pretty=format:'%n%w(78,4,6)+ %s (%aN)%n%n%w(78,6,6)%b%n' "$lastmod..HEAD" test/
25git log --pretty=format:'%n%w(78,4,6)+ %s (%aN)%n%n%w(78,6,6)%b%n' "$lastmod..HEAD" data/docx/
26git log --pretty=format:'%n%w(78,4,6)+ %s (%aN)%n%n%w(78,6,6)%b%n' "$lastmod..HEAD" data/odt/
27git log --pretty=format:'%n%w(78,4,6)+ %s (%aN)%n%n%w(78,6,6)%b%n' "$lastmod..HEAD" data/pptx/
28git log --pretty=format:'%n%w(78,4,6)+ %s (%aN)%n%n%w(78,6,6)%b%n' "$lastmod..HEAD" data/translations/
29git log --pretty=format:'%n%w(78,4,6)+ %s (%aN)%n%n%w(78,6,6)%b%n' "$lastmod..HEAD" citeproc/