From 9b88c98a53f52a637ffb681ec29643226d08f722 Mon Sep 17 00:00:00 2001 From: kirin10000 <57820613+kirin10000@users.noreply.github.com> Date: Thu, 24 Sep 2020 19:20:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=89=E8=A3=85=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 许多vps预装的系统长时间不更新,debian基直接安装依赖会失败(比如阿里云ecs ubuntu 20.04) --- install-release.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/install-release.sh b/install-release.sh index d8e3419..77dd5db 100644 --- a/install-release.sh +++ b/install-release.sh @@ -175,7 +175,15 @@ install_software() { command -v "$COMPONENT" > /dev/null 2>&1 && return if ${PACKAGE_MANAGEMENT_INSTALL} "$COMPONENT"; then echo "info: $COMPONENT is installed." - else + elif [ ${PACKAGE_MANAGEMENT_INSTALL} == 'apt install' ]; then + apt update + if ${PACKAGE_MANAGEMENT_INSTALL} "$COMPONENT"; then + echo "info: $COMPONENT is installed." + else + echo "error: Installation of $COMPONENT failed, please check your network." + exit 1 + fi + else echo "error: Installation of $COMPONENT failed, please check your network." exit 1 fi