forked from Interanet/server-bootstrap
initial commit
This commit is contained in:
28
scripts/mirrors/os/arvancloud/manjaro.sh
Normal file
28
scripts/mirrors/os/arvancloud/manjaro.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
echo "================================="
|
||||
echo " ArvanCloud Manjaro Mirror Setup"
|
||||
echo "================================="
|
||||
|
||||
source /etc/os-release
|
||||
|
||||
if [[ "$ID" != "manjaro" ]]; then
|
||||
echo "This script only supports Manjaro."
|
||||
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/manjaro/stable/\$repo/\$arch" \
|
||||
>> /etc/pacman.d/mirrorlist
|
||||
|
||||
pacman -Syyu
|
||||
|
||||
echo "Manjaro mirror configured."
|
||||
Reference in New Issue
Block a user