From 8a201424ddee0d349766346f9aead791e3cf743a Mon Sep 17 00:00:00 2001 From: Erope Date: Mon, 16 May 2022 23:30:45 +0800 Subject: [PATCH] Add update before fetch --- script/install.sh | 6 +++--- script/install_en.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/script/install.sh b/script/install.sh index 303396e..d3d4637 100755 --- a/script/install.sh +++ b/script/install.sh @@ -130,10 +130,10 @@ install_base() { install_soft() { # Arch官方库不包含selinux等组件 - (command -v yum >/dev/null 2>&1 && yum install $* selinux-policy -y) || - (command -v apt >/dev/null 2>&1 && apt install $* selinux-utils -y) || + (command -v yum >/dev/null 2>&1 && yum makecache && yum install $* selinux-policy -y) || + (command -v apt >/dev/null 2>&1 && apt update && apt install $* selinux-utils -y) || (command -v pacman >/dev/null 2>&1 && pacman -Syu $*) || - (command -v apt-get >/dev/null 2>&1 && apt-get install $* selinux-utils -y) + (command -v apt-get >/dev/null 2>&1 && apt-get update && apt-get install $* selinux-utils -y) } install_dashboard() { diff --git a/script/install_en.sh b/script/install_en.sh index 0d41645..5b1d9b9 100755 --- a/script/install_en.sh +++ b/script/install_en.sh @@ -100,10 +100,10 @@ install_base() { install_soft() { # The official Arch library does not contain selinux components - (command -v yum >/dev/null 2>&1 && yum install $* selinux-policy -y) || - (command -v apt >/dev/null 2>&1 && apt install $* selinux-utils -y) || + (command -v yum >/dev/null 2>&1 && yum makecache && yum install $* selinux-policy -y) || + (command -v apt >/dev/null 2>&1 && apt update && apt install $* selinux-utils -y) || (command -v pacman >/dev/null 2>&1 && pacman -Syu $*) || - (command -v apt-get >/dev/null 2>&1 && apt-get install $* selinux-utils -y) + (command -v apt-get >/dev/null 2>&1 && apt-get update && apt-get install $* selinux-utils -y) } install_dashboard() {