在选项1增加curl的安装

This commit is contained in:
悟空的日常镜像仓库 2024-05-07 17:33:16 +08:00
parent 03d212017b
commit 8d63f00ae7
1 changed files with 11 additions and 0 deletions

View File

@ -70,6 +70,17 @@ update_system_packages() {
green "Updating system packages..."
sudo apt update
sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
if ! command -v curl &> /dev/null; then
red "curl is not installed. Installing now..."
sudo apt update && sudo apt install -y curl
if command -v curl &> /dev/null; then
green "curl has been installed successfully."
else
echo "Failed to install curl. Please check for errors."
fi
else
echo "curl is already installed."
fi
}
# 安装文件管理器