Fix changelog.sh for Linux

This commit is contained in:
Jakob Borg 2015-03-22 15:45:40 +01:00
parent 2e1e8f764e
commit 3e98bae5ec

View File

@ -5,7 +5,16 @@ if [[ -z $since ]] ; then
since="$(git describe --abbrev=0 HEAD^).."
fi
git log --reverse --pretty=format:'* %s, @%aN)' "$since" | egrep 'fixes #\d|ref #\d' | sed 's/)[,. ]*,/,/' | sed 's/fixes #/#/g' | sed 's/ref #/#/g'
case $(uname) in
Darwin)
grep="egrep"
;;
*)
grep="grep -P"
;;
esac
git log --reverse --pretty=format:'* %s, @%aN)' "$since" | $grep 'fixes #\d|ref #\d' | sed 's/)[,. ]*,/,/' | sed 's/fixes #/#/g' | sed 's/ref #/#/g'
git diff "$since" -- AUTHORS