archlinux-mirror.sh/archlinux-mirror.sh
2024-07-19 00:49:42 +03:00

42 lines
971 B
Bash
Executable File

#!/bin/bash
REMOTE=rsync://mirror.yandex.ru/archlinux
BLACKARCH=rsync://blackarch.unixpeople.org/blackarch
CHAOTIC_AUR=https://chaotic.dr460nf1r3.org/repos/chaotic-aur/x86_64/
LOCAL=/run/media/chiaservant/LOCKDOWN_FILES/Archlinux-repo-mirror
mirror() {
echo "Mirroring $1"
rsync --recursive --hard-links --safe-links --copy-links --times \
--delete-after --delete-excluded \
--info=progress2 --stats --human-readable \
$REMOTE/$1 $LOCAL
}
mirror_black() {
echo "Mirroring $1"
rsync --recursive --hard-links --safe-links --copy-links --times \
--delete-after --delete-excluded \
--info=progress2 --stats --human-readable \
$BLACKARCH/$1 $LOCAL
}
mirror_chaotic() {
echo "Mirroring $1"
mkdir -p $LOCAL/chaotic-aur/os/x86_64
cd $LOCAL/chaotic-aur/os/x86_64
wget -r -l1 --no-parent -nd -nc $CHAOTIC_AUR
}
mirror core
mirror extra
mirror community
mirror multilib
mirror iso
mirror_black blackarch
mirror_chaotic chaotic-aur