This is an automated email from the ASF dual-hosted git repository.
zhaoliwei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git
The following commit(s) were added to refs/heads/master by this push:
new 20b344cc6 fix: move zookeeper-bin under (#1210)
20b344cc6 is described below
commit 20b344cc637f3c19d611ca53bf08f1a7d938d462
Author: Dan Wang <[email protected]>
AuthorDate: Fri Oct 28 10:43:53 2022 +0800
fix: move zookeeper-bin under (#1210)
---
run.sh | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/run.sh b/run.sh
index 4218d83c7..4d389e8d6 100755
--- a/run.sh
+++ b/run.sh
@@ -491,13 +491,6 @@ function run_start_zk()
type nc >/dev/null 2>&1 || { echo >&2 "start zk failed, need install
netcat command..."; exit 1;}
INSTALL_DIR=`pwd`/.zk_install
- if [ ! -d "${INSTALL_DIR}/zookeeper-bin" ]; then
- if [ -d "zookeeper-bin" ]; then
- # this zookeeper-bin must have been got from github action
workflows, thus just
- # move it to ${INSTALL_DIR} to prevent from downloading
- mv zookeeper-bin ${INSTALL_DIR}/
- fi
- fi
PORT=22181
while [[ $# > 0 ]]; do
key="$1"
@@ -524,6 +517,23 @@ function run_start_zk()
shift
done
+ if [ ! -d "${INSTALL_DIR}/zookeeper-bin" ]; then
+ echo "zookeeper-bin cannot be found under ${INSTALL_DIR}, thus try to
find an existing one"
+
+ if [ -d "zookeeper-bin" ]; then
+ echo "zookeeper-bin is found under current work dir `pwd`, just
use this one"
+
+ if ! mkdir -p "${INSTALL_DIR}"; then
+ echo "ERROR: mkdir ${INSTALL_DIR} failed"
+ exit 1
+ fi
+
+ # this zookeeper-bin must have been got from github action
workflows, thus just
+ # move it to ${INSTALL_DIR} to prevent from downloading
+ mv zookeeper-bin ${INSTALL_DIR}/
+ fi
+ fi
+
INSTALL_DIR="$INSTALL_DIR" PORT="$PORT" $ROOT/scripts/start_zk.sh
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]