couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [27/37] couchdb commit: updated refs/heads/master to 1ef7182
Date Wed, 24 Jun 2015 21:33:35 GMT
./configure: re-add --user option


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

Branch: refs/heads/master
Commit: b6f22ab09a4d81d3e1f5e1e963d49bb8f0de6b08
Parents: 72da08b
Author: Jan Lehnardt <jan@apache.org>
Authored: Wed Jun 24 16:06:26 2015 +0200
Committer: Jan Lehnardt <jan@apache.org>
Committed: Wed Jun 24 23:07:45 2015 +0200

----------------------------------------------------------------------
 configure | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/b6f22ab0/configure
----------------------------------------------------------------------
diff --git a/configure b/configure
index 7a94641..da198df 100755
--- a/configure
+++ b/configure
@@ -34,6 +34,7 @@ LIBDIR=
 DATABASEDIR=
 VIEWDIR=
 LOGDIR=
+COUCHDB_USER=`whoami`
 
 display_help () {
     cat << EOF
@@ -45,7 +46,7 @@ system for Apache CouchDB.
 Options:
 
   -h | --help                 display a short help message and exit
-  # -u USER       set the username to run as (defaults to $COUCHDB_USER)
+  -u | --user USER            set the username to run as (defaults to $COUCHDB_USER)
   --prefix=DIRECTORY          set the installation prefix (defaults to $DEFAULT_PREFIX)
   --databasedir DIRECTORY     specify the data directory (defaults to /var/lib/couchdb)
   --viewindexdir DIRECTORY    specify the view directory (defaults to /var/lib/couchdb)
@@ -96,6 +97,24 @@ parse_opts() {
                 continue
                 ;;
 
+            --user|-u)
+                if [ -n "$2" ]; then
+                    eval COUCHDB_USER=$2
+                    shift 2
+                    continue
+                else
+                    printf 'ERROR: "--user" requires a non-empty argument.\n' >&2
+                    exit 1
+                fi
+                ;;
+            --user=?*)
+                eval COUCHDB_USER=${1#*=}
+                ;;
+            --user=)
+                printf 'ERROR: "--user" requires a non-empty argument.\n' >&2
+                exit 1
+                ;;
+
             --prefix)
                 if [ -n "$2" ]; then
                     eval PREFIX=$2


Mime
View raw message