You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2015/07/22 07:29:46 UTC

[29/50] couchdb commit: updated refs/heads/developer-preview-2.0 to 2a31bca

./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/developer-preview-2.0
Commit: b6f22ab09a4d81d3e1f5e1e963d49bb8f0de6b08
Parents: 72da08b
Author: Jan Lehnardt <ja...@apache.org>
Authored: Wed Jun 24 16:06:26 2015 +0200
Committer: Jan Lehnardt <ja...@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