Files
server-bootstrap/scripts/mirrors/os/liara/manjaro.sh
2026-03-18 03:29:25 +08:00

33 lines
671 B
Bash

#!/usr/bin/env bash
set -e
echo "================================="
echo " Liara Manjaro Mirror Setup"
echo "================================="
source /etc/os-release
if [[ "$ID" != "manjaro" ]]; then
echo "This script only supports Manjaro."
echo "Detected OS: $ID"
exit 1
fi
echo
echo "[1/3] Backing up mirrorlist..."
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
echo
echo "[2/3] Writing Liara mirror..."
echo "Server = https://linux-mirror.liara.ir/repository/manjaro/stable/\$repo/\$arch" \
> /etc/pacman.d/mirrorlist
echo
echo "[3/3] Refreshing package databases..."
pacman -Syy
echo
echo "Manjaro mirror configured successfully."