couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject git commit: A portable way to populate THANKS.
Date Fri, 04 Jan 2013 17:13:57 GMT
Updated Branches:
  refs/heads/1.3.x d317eac18 -> 98988dd64


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.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/98988dd6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/98988dd6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/98988dd6

Branch: refs/heads/1.3.x
Commit: 98988dd64ad7f7379351f9c6b74e16d1e7bd95be
Parents: d317eac
Author: Jan Lehnardt <jan@apache.org>
Authored: Fri Jan 4 16:54:10 2013 +0100
Committer: Jan Lehnardt <jan@apache.org>
Committed: Fri Jan 4 17:45:56 2013 +0100

----------------------------------------------------------------------
 bootstrap |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/98988dd6/bootstrap
----------------------------------------------------------------------
diff --git a/bootstrap b/bootstrap
index b7c949a..1e5bdf1 100755
--- a/bootstrap
+++ b/bootstrap
@@ -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() {


Mime
View raw message