accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [1/3] git commit: ACCUMULO-2956 Make bootstrap_config work on Mac
Date Fri, 27 Jun 2014 19:00:25 GMT
Repository: accumulo
Updated Branches:
  refs/heads/1.6.1-SNAPSHOT be62a67b1 -> 5d81eca4d
  refs/heads/master 23e6ea8dd -> d38810b20


ACCUMULO-2956 Make bootstrap_config work on Mac

  Based on patch submitted to ACCUMULO-2646 by [~bhavanki]


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

Branch: refs/heads/1.6.1-SNAPSHOT
Commit: 5d81eca4d8ca25843eb2f6c201809e437133e823
Parents: be62a67
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Fri Jun 27 12:42:46 2014 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Fri Jun 27 12:42:46 2014 -0400

----------------------------------------------------------------------
 assemble/bin/bootstrap_config.sh | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/5d81eca4/assemble/bin/bootstrap_config.sh
----------------------------------------------------------------------
diff --git a/assemble/bin/bootstrap_config.sh b/assemble/bin/bootstrap_config.sh
index 5d36499..fb643da 100755
--- a/assemble/bin/bootstrap_config.sh
+++ b/assemble/bin/bootstrap_config.sh
@@ -18,14 +18,14 @@
 function usage {
   cat <<EOF
 Usage: bootstrap_config.sh [-options]
-where options include:
-    -d --dir        Alternate directory to setup config files
-    -s --size       Supported sizes: '1GB' '2GB' '3GB' '512MB'
-    -n --native     Configure to use native libraries
-    -j --jvm        Configure to use the jvm
-    -o --overwrite  Overwrite the default config directory
-    -v --version    Specify the Apache Hadoop version supported versions: '1' '2'
-    -h --help       Print this help message
+where options include (long options not available on all platforms):
+    -d, --dir        Alternate directory to setup config files
+    -s, --size       Supported sizes: '1GB' '2GB' '3GB' '512MB'
+    -n, --native     Configure to use native libraries
+    -j, --jvm        Configure to use the jvm
+    -o, --overwrite  Overwrite the default config directory
+    -v, --version    Specify the Apache Hadoop version supported versions: '1' '2'
+    -h, --help       Print this help message
 EOF
 }
 
@@ -56,7 +56,11 @@ OVERWRITE="0"
 BASE_DIR=
 
 #Execute getopt
-args=$(getopt -o "b:d:s:njov:h" -l "basedir:,dir:,size:,native,jvm,overwrite,version:,help"
-q -- "$@")
+if [[ $(uname -s) == "Linux" ]]; then
+  args=$(getopt -o "b:d:s:njov:h" -l "basedir:,dir:,size:,native,jvm,overwrite,version:,help"
-q -- "$@")
+else # Darwin, BSD
+  args=$(getopt b:d:s:njov:h $*)
+fi
 
 #Bad arguments
 if [[ $? != 0 ]]; then


Mime
View raw message