git.iko.soy/typeable/pandoc
on 2.9 help sign in
typeable/pandoc/tools/changelog-helper.sh
23 lines 681 B history raw
1#!/bin/sh
2# generate preliminary list of changes since changelog
3# was last modified
5lastmod=`git log -n2 --format=oneline changelog | awk '{print $1;}'`
6#git log --format=oneline $starthash..HEAD
7files=`git ls-tree -r master --name-only`
8for x in $files
9do
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_PAGER=cat 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