This is an automated email from the ASF dual-hosted git repository.

hxd pushed a commit to branch bugfix-4230
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 539d8ebae026b9422be1080dd2a51f4f9b2fcf9c
Author: xiangdong huang <[email protected]>
AuthorDate: Wed Nov 2 09:22:26 2022 +0800

    fix start-cli.sh does not support -e
---
 cli/src/assembly/resources/sbin/start-cli.sh | 37 +---------------------------
 1 file changed, 1 insertion(+), 36 deletions(-)

diff --git a/cli/src/assembly/resources/sbin/start-cli.sh 
b/cli/src/assembly/resources/sbin/start-cli.sh
old mode 100644
new mode 100755
index 7a4e2ddb1b..137d04c0ad
--- a/cli/src/assembly/resources/sbin/start-cli.sh
+++ b/cli/src/assembly/resources/sbin/start-cli.sh
@@ -111,14 +111,8 @@ IOTDB_CLI_CONF=${IOTDB_HOME}/conf
 MAIN_CLASS=org.apache.iotdb.cli.Cli
 
 
-if [ -d ${IOTDB_HOME}/lib ]; then
-LIB_PATH=${IOTDB_HOME}/lib
-else
-LIB_PATH=${IOTDB_HOME}/../lib
-fi
-
 CLASSPATH=""
-for f in ${LIB_PATH}/*.jar; do
+for f in ${IOTDB_HOME}/lib/*.jar; do
   CLASSPATH=${CLASSPATH}":"$f
 done
 
@@ -134,35 +128,6 @@ else
     JAVA=java
 fi
 
-PARAMETERS="$@"
-
-# if [ $# -eq 0 ]
-# then
-#      PARAMETERS="-h 127.0.0.1 -p 6667 -u root -pw root"
-# fi
-
-# Added parameters when default parameters are missing
-
-# sh version
-case "$PARAMETERS" in
-*"-pw "*) PARAMETERS=$PARAMETERS ;;
-*            ) PARAMETERS="-pw root $PARAMETERS" ;;
-esac
-case "$PARAMETERS" in
-*"-u "*) PARAMETERS=$PARAMETERS ;;
-*            ) PARAMETERS="-u root $PARAMETERS" ;;
-esac
-case "$PARAMETERS" in
-*"-p "*) PARAMETERS=$PARAMETERS ;;
-*            ) PARAMETERS="-p 6667 $PARAMETERS" ;;
-esac
-case "$PARAMETERS" in
-*"-h "*) PARAMETERS=$PARAMETERS ;;
-*            ) PARAMETERS="-h 127.0.0.1 $PARAMETERS" ;;
-esac
-
-# echo $PARAMETERS
-
 set -o noglob
 
iotdb_cli_params="-Dlogback.configurationFile=${IOTDB_CLI_CONF}/logback-cli.xml"
 exec "$JAVA" $iotdb_cli_params -cp "$CLASSPATH" "$MAIN_CLASS" $PARAMETERS

Reply via email to