From 7822f5b316c163dc18f6c5c54db292646ef2f72c Mon Sep 17 00:00:00 2001 From: lsy Date: Sun, 22 Sep 2024 23:02:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Earch=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E8=BD=AF=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Menus/Software.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Menus/Software.sh b/Menus/Software.sh index 1760648..857ac1a 100644 --- a/Menus/Software.sh +++ b/Menus/Software.sh @@ -2,6 +2,7 @@ declare install_str declare version="$(cat /etc/os-release | grep "^ID" | awk -F '=' '{print $2}')" +declare status=0 declare pkg if [[ -f "/usr/bin/apt-get" ]];then @@ -12,6 +13,10 @@ elif [[ -f "/usr/bin/apt" ]];then pkg='apt' install_str+="${pkg} install -y" sudo apt update -y +elif [[ -f "/usr/bin/pacman" ]];then + pkg='pacman' + install_str+="${pkg} -Sy --noconfirm" + sudo pacman -Syu --noconfirm else echo "暂不支持该系统一键安装常用软件" exit @@ -75,7 +80,6 @@ fi if [[ ! $pick_x =~ [Nn] ]];then - eval "$(curl https://get.x-cmd.com)" fi @@ -98,6 +102,12 @@ if [[ ! $pick_docker =~ [Nn] ]];then sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo ${pkg} update sudo ${pkg} install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y + elif [[ ${pkg} == 'arch' ]];then + sudo pacman -Sy docker --noconfirm + sudo systemctl start docker.service + sudo systemctl enable docker.service + sudo usermod -aG docker $USER + newgrp docker fi fi