You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2016/11/07 12:15:22 UTC
kylin git commit: KYLIN-2163 use -v opt instead of env variable for
kylin.sh
Repository: kylin
Updated Branches:
refs/heads/master 0efc45da0 -> 7211d9215
KYLIN-2163 use -v opt instead of env variable for kylin.sh
Signed-off-by: Yang Li <li...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/7211d921
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/7211d921
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/7211d921
Branch: refs/heads/master
Commit: 7211d92158c72979719df68659863ff985eafaa4
Parents: 0efc45d
Author: etherge <et...@163.com>
Authored: Sat Nov 5 21:32:55 2016 +0800
Committer: Yang Li <li...@apache.org>
Committed: Mon Nov 7 20:13:47 2016 +0800
----------------------------------------------------------------------
build/bin/header.sh | 14 ++++++++++++++
build/bin/kylin.sh | 8 +++++---
2 files changed, 19 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/7211d921/build/bin/header.sh
----------------------------------------------------------------------
diff --git a/build/bin/header.sh b/build/bin/header.sh
index 949ea95..8a6fc00 100644
--- a/build/bin/header.sh
+++ b/build/bin/header.sh
@@ -19,6 +19,20 @@
# source me
+verbose=${verbose:-""}
+
+while getopts ":v" opt; do
+ case $opt in
+ v)
+ echo "Turn on verbose mode." >&2
+ verbose=true
+ ;;
+ \?)
+ echo "Invalid option: -$OPTARG" >&2
+ ;;
+ esac
+done
+
if [[ "$dir" == "" ]]
then
dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
http://git-wip-us.apache.org/repos/asf/kylin/blob/7211d921/build/bin/kylin.sh
----------------------------------------------------------------------
diff --git a/build/bin/kylin.sh b/build/bin/kylin.sh
index f45c1dd..dedb552 100644
--- a/build/bin/kylin.sh
+++ b/build/bin/kylin.sh
@@ -18,9 +18,11 @@
#
# set verbose=true to print more logs during start up
-verbose=${verbose:-""}
-source $(cd -P -- "$(dirname -- "$0")" && pwd -P)/header.sh
+source $(cd -P -- "$(dirname -- "$0")" && pwd -P)/header.sh $@
+if [ "$verbose" = true ]; then
+ shift
+fi
source ${dir}/check-env.sh
mkdir -p ${KYLIN_HOME}/logs
@@ -162,5 +164,5 @@ then
exec hbase ${KYLIN_EXTRA_START_OPTS} -Dkylin.hive.dependency=${hive_dependency} -Dkylin.hbase.dependency=${hbase_dependency} -Dlog4j.configuration=kylin-log4j.properties "$@"
else
- quit "Usage: 'kylin.sh start' or 'kylin.sh stop'"
+ quit "Usage: 'kylin.sh [-v] start' or 'kylin.sh [-v] stop'"
fi