This commit is contained in:
casual 2024-07-19 00:49:42 +03:00
parent 0cc4c07463
commit 59d7e3359b

41
archlinux-mirror.sh Executable file
View File

@ -0,0 +1,41 @@
#!/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