From 59d7e3359b0a3fee6a2fbc9b6e44d5b6350da909 Mon Sep 17 00:00:00 2001 From: casual Date: Fri, 19 Jul 2024 00:49:42 +0300 Subject: [PATCH] init --- archlinux-mirror.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 archlinux-mirror.sh 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