diff --git a/scripts/batch_build_all_service.sh b/scripts/batch_build_all_service.sh index 79cbb6c64..83aba4451 100755 --- a/scripts/batch_build_all_service.sh +++ b/scripts/batch_build_all_service.sh @@ -17,7 +17,7 @@ OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. # Include necessary files -source "$(dirname "${BASH_SOURCE[0]}")/../scripts/function" +source "$(dirname "${BASH_SOURCE[0]}")/../scripts.sh" # Include specific functions and variables source "$(dirname "${BASH_SOURCE[0]}")/../scripts/style_info.cfg" \ diff --git a/scripts/build_all_service.sh b/scripts/build_all_service.sh index 7a583c970..aed63a818 100755 --- a/scripts/build_all_service.sh +++ b/scripts/build_all_service.sh @@ -17,12 +17,12 @@ source ./style_info.cfg source ./path_info.cfg source ./function.sh -echo -e "\n" +echo -e "" echo -e "${BACKGROUND_BLUE}===============> Building all using make build binary files ${COLOR_SUFFIX}" -echo -e "\n" -echo -e "${BOLD_PREFIX}_____ _ _ _____ _____ _____ _____ _____ _____ _____ _____ _____ ${COLOR_SUFFIX}" +echo -e "" +echo -e "${BOLD_PREFIX}____________________________________________________________ ${COLOR_SUFFIX}" bin_dir="$BIN_DIR" @@ -39,14 +39,13 @@ if [ ! -d $sdk_db_dir ]; then mkdir -p $sdk_db_dir fi -# OpenIM root path +#Include shell font styles and some basic information OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. -source ./style_info.cfg -source ./path_info.cfg -source ./function.sh - -#!/bin/bash +#Include shell font styles and some basic information +source $OPENIM_ROOT/scripts/style_info.cfg +source $OPENIM_ROOT/scripts/path_info.cfg +source $OPENIM_ROOT/scripts/function.sh cd $OPENIM_ROOT @@ -102,11 +101,11 @@ for binary in $(find _output/bin/platforms/$REPO_DIR -type f); do fi done -echo -e " \n" +echo -e " " echo -e "${BOLD_PREFIX}=====================> Build Results <=====================${COLOR_SUFFIX}" -echo -e " \n" +echo -e " " if [[ "$BUILD_SUCCESS" == true ]]; then echo -e "${GREEN_PREFIX}All binaries built successfully.${COLOR_SUFFIX}" @@ -117,8 +116,8 @@ else done fi -echo -e " \n" +echo -e " " echo -e "${BOLD_PREFIX}============================================================${COLOR_SUFFIX}" -echo -e " \n" +echo -e " " diff --git a/scripts/enterprise/check_all.sh b/scripts/enterprise/check_all.sh index 893e1bf32..8c9d3a82a 100755 --- a/scripts/enterprise/check_all.sh +++ b/scripts/enterprise/check_all.sh @@ -13,10 +13,16 @@ # See the License for the specific language governing permissions and # limitations under the License. +#Include shell font styles and some basic information +OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. + +#Include shell font styles and some basic information +source $OPENIM_ROOT/scripts/style_info.cfg +source $OPENIM_ROOT/scripts/path_info.cfg +source $OPENIM_ROOT/scripts/function.sh + +cd "$OPENIM_ROOT/scripts/" -source ./style_info.cfg -source ./enterprise/path_info.cfg -source ./enterprise/function.sh service_port_name=( openImChatApiPort openImAdminApiPort diff --git a/scripts/enterprise/path_info.cfg b/scripts/enterprise/path_info.cfg index 168d46049..6ce712593 100644 --- a/scripts/enterprise/path_info.cfg +++ b/scripts/enterprise/path_info.cfg @@ -15,8 +15,8 @@ service_source_root=( ../cmd/api/chat/ ../cmd/api/admin/ #rpc service file - ../cmd/rpc/admin/ - ../cmd/rpc/chat/ + ../cmd/openim-rpc/admin/ + ../cmd/openim-rpc/chat/ ) #service filename service_names=( diff --git a/scripts/msg_gateway_start.sh b/scripts/msg_gateway_start.sh index 9f4fb5e5f..5ca720aa8 100755 --- a/scripts/msg_gateway_start.sh +++ b/scripts/msg_gateway_start.sh @@ -19,7 +19,7 @@ OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. #Include shell font styles and some basic information source $OPENIM_ROOT/scripts/style_info.cfg source $OPENIM_ROOT/scripts/path_info.cfg -source $OPENIM_ROOT/scripts/function +source $OPENIM_ROOT/scripts/function.sh bin_dir="$OPENIM_ROOT/bin" logs_dir="$OPENIM_ROOT/logs" diff --git a/scripts/msg_transfer_start.sh b/scripts/msg_transfer_start.sh index 01118af32..2cd1ff8d7 100755 --- a/scripts/msg_transfer_start.sh +++ b/scripts/msg_transfer_start.sh @@ -19,7 +19,7 @@ OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. #Include shell font styles and some basic information source $OPENIM_ROOT/scripts/style_info.cfg source $OPENIM_ROOT/scripts/path_info.cfg -source $OPENIM_ROOT/scripts/function +source $OPENIM_ROOT/scripts/function.sh bin_dir="$OPENIM_ROOT/bin" logs_dir="$OPENIM_ROOT/logs" diff --git a/scripts/path_info.cfg b/scripts/path_info.cfg index a86add786..6c031c8b3 100755 --- a/scripts/path_info.cfg +++ b/scripts/path_info.cfg @@ -23,7 +23,7 @@ if [[ -z ${supported_architectures["$version-$architecture"]} ]]; then echo "================> Unsupported architecture: $architecture or version: $version" exit 1 fi -Server Start Time + echo "================> Architecture: $architecture" # Set the BIN_DIR based on the architecture and version @@ -31,32 +31,31 @@ BIN_DIR=${supported_architectures["$version-$architecture"]} echo "================> BIN_DIR: $OPENIM_ROOT/$BIN_DIR" - # Don't put the space between "=" openim_msggateway="openim-msggateway" -msg_gateway_binary_root= $OPENIM_ROOT/$BIN_DIR/ +msg_gateway_binary_root="$OPENIM_ROOT/$BIN_DIR" msg_gateway_source_root="../cmd/msggateway/" msg_name="openim-rpc-msg" -msg_binary_root=$OPENIM_ROOT/$BIN_DIR -msg_source_root="../cmd/rpc/msg/" +msg_binary_root="$OPENIM_ROOT/$BIN_DIR" +msg_source_root="../cmd/openim-rpc/msg/" push_name="openim-push" -push_binary_root=$OPENIM_ROOT/$BIN_DIR +push_binary_root="$OPENIM_ROOT/$BIN_DIR" push_source_root="../cmd/push/" openim_msgtransfer="openim-rpc-msg_transfer" -msg_transfer_binary_root=$OPENIM_ROOT/$BIN_DIR +msg_transfer_binary_root="$OPENIM_ROOT/$BIN_DIR" msg_transfer_source_root="../cmd/msgtransfer/" msg_transfer_service_num=4 cron_task_name="openim-crontask" -cron_task_binary_root=$OPENIM_ROOT/$BIN_DIR +cron_task_binary_root="$OPENIM_ROOT/$BIN_DIR" cron_task_source_root="../cmd/crontask/" cmd_utils_name="openim_cmd_utils" -cmd_utils_binary_root=$OPENIM_ROOT/$BIN_DIR +cmd_utils_binary_root="$OPENIM_ROOT/$BIN_DIR" cmd_utils_source_root="../cmd/cmduitls/" # Global configuration file default dir @@ -67,13 +66,13 @@ service_source_root=( # api service file "../cmd/api/" # rpc service file - "../cmd/rpc/user/" - "../cmd/rpc/friend/" - "../cmd/rpc/group/" - "../cmd/rpc/auth/" - "../cmd/rpc/conversation/" - "../cmd/rpc/third/" - "../cmd/crontask" + "../cmd/openim-rpc/openim-rpc-user/" + "../cmd/openim-rpc/openim-rpc-friend/" + "../cmd/openim-rpc/openim-rpc-group/" + "../cmd/openim-rpc/openim-rpc-auth/" + "../cmd/openim-rpc/openim-rpc-conversation/" + "../cmd/openim-rpc/openim-rpc-third/" + "../cmd/openim-crontask" "${msg_gateway_source_root}" "${msg_transfer_source_root}" "${msg_source_root}" diff --git a/scripts/push_start.sh b/scripts/push_start.sh index f13056259..c2a8e7d36 100755 --- a/scripts/push_start.sh +++ b/scripts/push_start.sh @@ -19,7 +19,7 @@ OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. #Include shell font styles and some basic information source $OPENIM_ROOT/scripts/style_info.cfg source $OPENIM_ROOT/scripts/path_info.cfg -source $OPENIM_ROOT/scripts/function +source $OPENIM_ROOT/scripts/function.sh bin_dir="$OPENIM_ROOT/bin" logs_dir="$OPENIM_ROOT/logs" diff --git a/scripts/start_all.sh b/scripts/start_all.sh index 92134ca44..7a9fd656c 100755 --- a/scripts/start_all.sh +++ b/scripts/start_all.sh @@ -22,7 +22,7 @@ OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. #Include shell font styles and some basic information source $OPENIM_ROOT/scripts/style_info.cfg source $OPENIM_ROOT/scripts/path_info.cfg -source $OPENIM_ROOT/scripts/function +source $OPENIM_ROOT/scripts/function.sh bin_dir="$OPENIM_ROOT/bin" logs_dir="$OPENIM_ROOT/logs" diff --git a/scripts/start_cron.sh b/scripts/start_cron.sh index 26f9abf8b..b18d19478 100755 --- a/scripts/start_cron.sh +++ b/scripts/start_cron.sh @@ -19,7 +19,7 @@ OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. #Include shell font styles and some basic information source $OPENIM_ROOT/scripts/style_info.cfg source $OPENIM_ROOT/scripts/path_info.cfg -source $OPENIM_ROOT/scripts/function +source $OPENIM_ROOT/scripts/function.sh bin_dir="$OPENIM_ROOT/bin" logs_dir="$OPENIM_ROOT/logs" diff --git a/scripts/start_rpc_service.sh b/scripts/start_rpc_service.sh index e67711d49..028bdc8c8 100755 --- a/scripts/start_rpc_service.sh +++ b/scripts/start_rpc_service.sh @@ -18,7 +18,7 @@ OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. #Include shell font styles and some basic information source $OPENIM_ROOT/scripts/style_info.cfg source $OPENIM_ROOT/scripts/path_info.cfg -source $OPENIM_ROOT/scripts/function +source $OPENIM_ROOT/scripts/function.sh bin_dir="$BIN_DIR" logs_dir="$OPENIM_ROOT/logs" diff --git a/scripts/stop_all.sh b/scripts/stop_all.sh index fac3d7f41..133bb9577 100755 --- a/scripts/stop_all.sh +++ b/scripts/stop_all.sh @@ -19,7 +19,7 @@ OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. #Include shell font styles and some basic information source $OPENIM_ROOT/scripts/style_info.cfg source $OPENIM_ROOT/scripts/path_info.cfg -source $OPENIM_ROOT/scripts/function +source $OPENIM_ROOT/scripts/function.sh bin_dir="$OPENIM_ROOT/bin" logs_dir="$OPENIM_ROOT/logs"