From 3e98bae5ec5f4fd9213a2e5510368f6a1ed4ddb3 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Sun, 22 Mar 2015 15:45:40 +0100 Subject: [PATCH] Fix changelog.sh for Linux --- changelog.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/changelog.sh b/changelog.sh index 72bd06662..f6e2e5bc6 100755 --- a/changelog.sh +++ b/changelog.sh @@ -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