initial commit

This commit is contained in:
2026-03-18 03:29:25 +08:00
commit 146c2c5f35
37 changed files with 1445 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -e
echo "================================="
echo " ArvanCloud Arch Mirror Setup"
echo "================================="
if [[ ! -f /etc/arch-release ]]; then
echo "This script only supports Arch."
exit 1
fi
echo "[1/3] Backing up mirrorlist..."
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
echo "[2/3] Commenting existing mirrors..."
sed -i 's/^Server/#Server/g' /etc/pacman.d/mirrorlist
echo "[3/3] Adding ArvanCloud mirror..."
echo "Server = https://mirror.arvancloud.ir/archlinux/\$repo/os/\$arch" \
>> /etc/pacman.d/mirrorlist
pacman -Syyu
echo "Arch mirror configured."