From f91a1599b65a8cf5e49fab5727b91bf05094220a Mon Sep 17 00:00:00 2001 From: cncsmonster Date: Mon, 9 Oct 2023 12:09:45 +0800 Subject: [PATCH] feat: check if binary has been build when make start --- scripts/start_all.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/start_all.sh b/scripts/start_all.sh index b2ee16214..de45e8fc5 100755 --- a/scripts/start_all.sh +++ b/scripts/start_all.sh @@ -91,6 +91,12 @@ for ((i = 0; i < ${#service_filename[*]}; i++)); do #Start related rpc services based on the number of ports for ((j = 0; j < ${#service_ports[*]}; j++)); do + if [ ! -e "${service_filename[$i]}" ]; then + echo -e ${RED_PREFIX}"Error: ${service_filename[$i]} does not exist,Start fail!"${COLOR_SUFFIX} + echo "You may need to execute the build_all_service.sh script or use make build to compile the service" + exit -1 + fi + echo "$bin_dir/${service_filename[$i]}" #Start the service in the background cmd="$bin_dir/${service_filename[$i]} -port ${service_ports[$j]} --config_folder_path ${config_path}" if [ $i -eq 0 -o $i -eq 1 ]; then