diff options
author | Jan Lehnardt <jan@apache.org> | 2013-01-04 16:54:10 +0100 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2013-01-04 17:28:42 +0100 |
commit | 4b20418391a9a77012ff74c8064f3da910c310fb (patch) | |
tree | d65f2f6ab9d73b86cad31c968e68fbc4bf31f1a8 | |
parent | 0d6fba2e6bcc3c7ec9fc436efc6b8a129523e3ae (diff) | |
download | couchdb-4b20418391a9a77012ff74c8064f3da910c310fb.tar.gz |
A portable way to populate THANKS.
In particular:
- BSD sed and GNU sed dosagree on commandline options.
- echo "\n" >> FILE or "\r\n" for that matter, does not create a
newline in FILE on Windows.
Original patch by Christopher Bonhage, applied with slight modification.
Closes COUCHDB-1628.
-rwxr-xr-x | bootstrap | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -44,11 +44,23 @@ else fi if test -d .git; then + OS=`uname -s` + case "$OS" in + Linux|CYGWIN*) # GNU sed + SED_ERE_FLAG=-r + ;; + *) # BSD sed + SED_ERE_FLAG=-E + ;; + esac + sed -e "/^#.*/d" THANKS.in > THANKS + CONTRIB_EMAIL_SED_COMMAND="s/^[[:blank:]]{5}[[:digit:]]+[[:blank:]]/ * /" git shortlog -se 6c976bd..HEAD \ | grep -v @apache.org \ - | sed -E "s/^[[:blank:]]{5}[[:digit:]]+[[:blank:]]/ * /" >> THANKS - echo "\nFor a list of authors see the \`AUTHORS\` file." >> THANKS + | sed $SED_ERE_FLAG -e "$CONTRIB_EMAIL_SED_COMMAND" >> THANKS + echo "" >> THANKS # simplest portable newline + echo "For a list of authors see the \`AUTHORS\` file." >> THANKS fi find_program() { |