diff --git a/archlinux-mirror.sh b/archlinux-mirror.sh new file mode 100755 index 0000000..f42f241 --- /dev/null +++ b/archlinux-mirror.sh @@ -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