调整 install.sh 执行顺序:先克隆仓库配置镜像源,再更新和安装

This commit is contained in:
2026-03-25 15:14:35 +08:00
parent ac236ccbf8
commit 57999214dc
+19 -16
View File
@@ -4,22 +4,8 @@ set -euo pipefail
REPO_URL="https://git.furtherverse.com/imbytecat/archlinux-config.git"
CONFIG_DIR="$HOME/.config/arch-config"
echo "==> 更新系统..."
sudo pacman -Syu --noconfirm
echo "==> 安装基础工具..."
sudo pacman -S --needed --noconfirm base-devel git
echo "==> 安装 yay..."
if ! command -v yay &> /dev/null; then
rm -rf /tmp/yay
git clone https://aur.archlinux.org/yay.git /tmp/yay
cd /tmp/yay
makepkg -si --noconfirm
fi
echo "==> 安装 dcli..."
yay -S --needed --noconfirm dcli-arch-git
echo "==> 安装 git..."
sudo pacman -S --needed --noconfirm git
echo "==> 克隆配置仓库..."
if [ -d "$CONFIG_DIR/.git" ]; then
@@ -36,6 +22,23 @@ sudo cp "$CONFIG_DIR/files/etc/pacman.d/mirrorlist" /etc/pacman.d/mirrorlist
sudo cp "$CONFIG_DIR/files/etc/sudoers.d/10-wheel" /etc/sudoers.d/10-wheel
sudo chmod 440 /etc/sudoers.d/10-wheel
echo "==> 更新系统..."
sudo pacman -Syu --noconfirm
echo "==> 安装基础工具..."
sudo pacman -S --needed --noconfirm base-devel
echo "==> 安装 yay..."
if ! command -v yay &> /dev/null; then
rm -rf /tmp/yay
git clone https://aur.archlinux.org/yay.git /tmp/yay
cd /tmp/yay
makepkg -si --noconfirm
fi
echo "==> 安装 dcli..."
yay -S --needed --noconfirm dcli-arch-git
echo ""
echo "✓ 安装完成!"
echo ""