fix the double caret bug in sample.sh when executed in old bash version of 
enterprise os

Signed-off-by: Billy Liu <billy...@apache.org>


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

Branch: refs/heads/ranger
Commit: 57f665d63aabc8b8cf886cf7562ca92effebd176
Parents: a0ca77d
Author: Ting Wang <wangtin...@cmbc.com.cn>
Authored: Fri Sep 8 22:08:12 2017 +0800
Committer: Billy Liu <billy...@apache.org>
Committed: Sat Sep 9 21:22:55 2017 +0800

----------------------------------------------------------------------
 build/bin/sample.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/57f665d6/build/bin/sample.sh
----------------------------------------------------------------------
diff --git a/build/bin/sample.sh b/build/bin/sample.sh
index dc98665..9545362 100755
--- a/build/bin/sample.sh
+++ b/build/bin/sample.sh
@@ -47,8 +47,7 @@ fi
 hadoop ${hadoop_conf_param} fs -put * ${hdfs_tmp_dir}/sample_cube/data/
 
 hive_client_mode=`bash ${KYLIN_HOME}/bin/get-properties.sh 
kylin.source.hive.client`
-sample_database=`bash ${KYLIN_HOME}/bin/get-properties.sh 
kylin.source.hive.database-for-flat-table`
-sample_database=${sample_database^^}
+sample_database=`bash ${KYLIN_HOME}/bin/get-properties.sh 
kylin.source.hive.database-for-flat-table | tr [a-z] [A-Z]`
 echo "Going to create sample tables in hive to database "$sample_database" by 
"$hive_client_mode
 
 if [ "${hive_client_mode}" == "beeline" ]

Reply via email to