8d1f6254cc
- 将 arch-config/ 内容移至仓库根目录 - setup.sh 重命名为 install.sh - 脚本改为自动 clone 仓库到 ~/.config/arch-config - 新增 pacman -Syu 系统更新步骤 - README 简化为 curl 一行安装
37 lines
818 B
Bash
Executable File
37 lines
818 B
Bash
Executable File
#!/bin/bash
|
|
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 "==> 克隆配置仓库..."
|
|
if [ -d "$CONFIG_DIR" ]; then
|
|
echo "配置目录已存在,跳过克隆"
|
|
else
|
|
git clone "$REPO_URL" "$CONFIG_DIR"
|
|
fi
|
|
|
|
echo ""
|
|
echo "✓ 安装完成!"
|
|
echo ""
|
|
echo "下一步:"
|
|
echo " cd ~/.config/arch-config"
|
|
echo " dcli sync"
|