取消互动信息

This commit is contained in:
James 2025-01-21 12:52:36 +08:00
parent 2f3dc9ef79
commit 3e19b74497
2 changed files with 11 additions and 7 deletions

View File

@ -251,6 +251,8 @@ install_dependencies() {
done
;;
*)
install_cmd="apt-get install -yq"
export DEBIAN_FRONTEND=noninteractive
for dep in "${dependencies[@]}"; do
if ! command -v "$dep" &> /dev/null; then
echo -e "${YELLOW}正在安装 $dep...${NC}"

View File

@ -202,7 +202,6 @@ update_system() {
# 定义支持的操作系统类型
SUPPORTED_OS=("ubuntu" "debian" "linuxmint" "elementary" "pop" "centos" "rhel" "fedora" "rocky" "almalinux" "openeuler" "opensuse" "sles" "arch" "manjaro" "alpine" "gentoo" "cloudlinux")
# 安装依赖
install_dependencies() {
echo -e "${YELLOW}正在检查并安装必要的依赖项...${NC}"
@ -225,11 +224,11 @@ install_dependencies() {
case "${os_type,,}" in
gentoo)
install_cmd="emerge"
install_cmd="emerge --quiet"
for dep in "${dependencies[@]}"; do
if ! emerge -p $dep &>/dev/null; then
if ! emerge -p "$dep" &>/dev/null; then
echo -e "${YELLOW}正在安装 $dep...${NC}"
if ! sudo $install_cmd $dep; then
if ! sudo $install_cmd "$dep"; then
echo -e "${RED}无法安装 $dep。请手动安装此依赖项。${NC}"
fi
else
@ -238,9 +237,9 @@ install_dependencies() {
done
;;
alpine)
install_cmd="apk add"
install_cmd="apk add --no-cache"
for dep in "${dependencies[@]}"; do
if ! command -v "$dep" &> /dev/null; then
if ! command -v "$dep" &>/dev/null; then
echo -e "${YELLOW}正在安装 $dep...${NC}"
if ! sudo $install_cmd "$dep"; then
echo -e "${RED}无法安装 $dep。请手动安装此依赖项。${NC}"
@ -251,8 +250,10 @@ install_dependencies() {
done
;;
*)
install_cmd="apt-get install -yq"
export DEBIAN_FRONTEND=noninteractive
for dep in "${dependencies[@]}"; do
if ! command -v "$dep" &> /dev/null; then
if ! command -v "$dep" &>/dev/null; then
echo -e "${YELLOW}正在安装 $dep...${NC}"
if ! sudo $install_cmd "$dep"; then
echo -e "${RED}无法安装 $dep。请手动安装此依赖项。${NC}"
@ -268,6 +269,7 @@ install_dependencies() {
clear
}
# 获取IP地址和ISP信息
ip_address_and_isp() {
ipv4_address=$(curl -s --max-time 5 ipv4.ip.sb)