删除更新软件包时自动更新软件

This commit is contained in:
lsy 2024-09-22 21:52:58 +08:00
parent efe516fd92
commit a1c151ec0b
2 changed files with 0 additions and 4 deletions

View File

@ -25,12 +25,10 @@ case "$pick" in
read -p "请输入:" lang read -p "请输入:" lang
if [[ -f "/usr/bin/apt-get" ]];then if [[ -f "/usr/bin/apt-get" ]];then
sudo apt-get update -y sudo apt-get update -y
sudo apt-get dist-upgrade -y
sudo apt-get install -y locales sudo apt-get install -y locales
sudo apt-get install -y language-pack-zh-hans sudo apt-get install -y language-pack-zh-hans
elif [[ -f "/usr/bin/apt" ]];then elif [[ -f "/usr/bin/apt" ]];then
sudo apt update -y sudo apt update -y
sudo apt dist-upgrade -y
sudo apt install -y locales sudo apt install -y locales
sudo apt install -y language-pack-zh-hans sudo apt install -y language-pack-zh-hans
else else

View File

@ -8,12 +8,10 @@ if [[ -f "/usr/bin/apt-get" ]];then
pkg='apt-get' pkg='apt-get'
install_str+="${pkg} install -y" install_str+="${pkg} install -y"
sudo apt-get update -y sudo apt-get update -y
sudo apt-get dist-upgrade -y
elif [[ -f "/usr/bin/apt" ]];then elif [[ -f "/usr/bin/apt" ]];then
pkg='apt' pkg='apt'
install_str+="${pkg} install -y" install_str+="${pkg} install -y"
sudo apt update -y sudo apt update -y
sudo apt dist-upgrade -y
else else
echo "暂不支持该系统一键安装常用软件" echo "暂不支持该系统一键安装常用软件"
exit exit