From 764af47b7455a72aa6cbb12b23c2b3436532ebe2 Mon Sep 17 00:00:00 2001 From: sunway910 Date: Thu, 29 Aug 2024 14:25:30 +0800 Subject: [PATCH] clean log --- install.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 27e6471..1bab536 100644 --- a/install.sh +++ b/install.sh @@ -33,6 +33,7 @@ install_dependencies() { if [ x"$DISTRO" == x"Ubuntu" ]; then log_info "------------Apt update--------------" if ! apt-get update; then + log_info "Please check your network or apt source and then try again" log_err "Apt update failed" exit 1 fi @@ -40,7 +41,7 @@ install_dependencies() { log_info "------------Install dependencies--------------" if ! apt-get install -y git jq curl wget net-tools; then log_err "Failed to install some libs " - log_info "You can install it manually and ignore this error log" + log_info "Can install it manually and ignore this error log" fi if ! command_exists nc; then apt-get install -y netcat @@ -55,14 +56,15 @@ install_dependencies() { elif [ x"$DISTRO" == x"CentOS" ]; then log_info "------------Yum update--------------" if ! yum update; then + log_info "Please check your network or yum source and then try again" log_err "Yum update failed" exit 1 fi log_info "------------Install dependencies--------------" if ! yum install -y git jq curl wget net-tools; then - log_err "Failed to install some libs " - log_info "You can install it manually and ignore this error log" + log_err "Failed to install some libs" + log_info "Can install it manually and ignore this error log" fi if ! command_exists nc; then sudo yum install epel-release -y @@ -94,7 +96,7 @@ install_dependencies() { done if ! command_exists yq; then log_err "Install yq failed" - exit 1 + log_info "Can install it manually and ignore this error log" fi need_install_docker=1 @@ -112,7 +114,7 @@ install_dependencies() { # install or update docker if ! curl -fsSL https://get.docker.com | bash; then log_err "Install docker failed" - log_info "You can install docker manually and ignore this error log" + log_info "Can install docker manually and ignore this error log" fi fi @@ -122,7 +124,7 @@ install_dependencies() { add_docker_ubuntu_repo if ! apt-get install -y docker-compose-plugin; then log_err "Install docker-compose-plugin failed" - log_info "You can install docker compose manually and ignore this error log" + log_info "Can install docker compose manually and ignore this error log" fi fi elif [ x"$DISTRO" == x"CentOS" ]; then @@ -130,7 +132,7 @@ install_dependencies() { add_docker_centos_repo if ! yum install -y docker-compose-plugin; then log_err "Install docker-compose-plugin failed" - log_info "You can install docker compose manually and ignore this error log" + log_info "Can install docker compose manually and ignore this error log" fi fi fi