summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--raveos-calamares-theme/PKGBUILD5
-rwxr-xr-xraveos-calamares-theme/etc/calamares/modules/raveos-tukor-rangsor.sh29
-rw-r--r--raveos-calamares-theme/etc/calamares/modules/shellprocess-pacstrap.conf2
3 files changed, 35 insertions, 1 deletions
diff --git a/raveos-calamares-theme/PKGBUILD b/raveos-calamares-theme/PKGBUILD
index 141170b..c146f92 100644
--- a/raveos-calamares-theme/PKGBUILD
+++ b/raveos-calamares-theme/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: nippy <nippy@tuta.io>
pkgname=raveos-calamares-theme
pkgver=2.0.0
-pkgrel=80
+pkgrel=81
pkgdesc="RaveOS Calamares Theme"
arch=('any')
url="https://git.rp1.hu/RaveOS"
@@ -33,6 +33,9 @@ package() {
install -Dm755 "${startdir}/etc/calamares/modules/calamares-snapper-setup.sh" \
"${pkgdir}/etc/calamares/modules/calamares-snapper-setup.sh"
+ install -Dm755 "${startdir}/etc/calamares/modules/raveos-tukor-rangsor.sh" \
+ "${pkgdir}/etc/calamares/modules/raveos-tukor-rangsor.sh"
+
local lrelease_bin
lrelease_bin="$(command -v lrelease6 || command -v lrelease || echo /usr/lib/qt6/bin/lrelease)"
for ts in "${startdir}"/etc/calamares/branding/raveos/lang/calamares-raveos_*.ts; do
diff --git a/raveos-calamares-theme/etc/calamares/modules/raveos-tukor-rangsor.sh b/raveos-calamares-theme/etc/calamares/modules/raveos-tukor-rangsor.sh
new file mode 100755
index 0000000..312030b
--- /dev/null
+++ b/raveos-calamares-theme/etc/calamares/modules/raveos-tukor-rangsor.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+set -uo pipefail
+
+LISTA=/etc/pacman.d/mirrorlist
+UJ=$(mktemp)
+
+for _ in $(seq 1 90); do
+ systemctl is-active --quiet reflector-once.service chaotic-rankmirrors.service || break
+ sleep 1
+done
+
+echo ">>> [tukor] Arch tukrok rangsorolasa"
+if timeout 150 reflector --country HU,AT,DE,PL,CZ,SK --protocol https --completion-percent 100 --delay 3 \
+ --latest 20 --sort rate --number 10 --download-timeout 10 --connection-timeout 5 --threads 5 \
+ --save "$UJ" && grep -q '^Server' "$UJ"; then
+ cp -f "$LISTA" "$LISTA.regi" 2>/dev/null || true
+ install -m644 "$UJ" "$LISTA"
+ echo ">>> [tukor] Uj tukorlista:"
+ grep '^Server' "$LISTA"
+else
+ echo ">>> [tukor] A reflector nem sikerult, a meglevo tukorlista marad"
+fi
+rm -f "$UJ"
+
+if [ -x /usr/local/bin/chaotic-rankmirrors ]; then
+ timeout 120 /usr/local/bin/chaotic-rankmirrors || true
+fi
+
+exit 0
diff --git a/raveos-calamares-theme/etc/calamares/modules/shellprocess-pacstrap.conf b/raveos-calamares-theme/etc/calamares/modules/shellprocess-pacstrap.conf
index a6aa062..0bdfc9c 100644
--- a/raveos-calamares-theme/etc/calamares/modules/shellprocess-pacstrap.conf
+++ b/raveos-calamares-theme/etc/calamares/modules/shellprocess-pacstrap.conf
@@ -4,5 +4,7 @@ timeout: 3600
script:
- command: "/usr/bin/pacman-key --init && /usr/bin/pacman-key --populate"
name: "Initializing package signing keys..."
+ - command: "/etc/calamares/modules/raveos-tukor-rangsor.sh"
+ name: "Selecting the fastest mirrors..."
- command: "pacstrap ${ROOT} base base-devel btrfs-progs raveos-keyring chaotic-keyring chaotic-mirrorlist linux-cachyos linux-cachyos-headers linux-firmware networkmanager iwd broadcom-wl-dkms wireless-regdb nano vim grub snapper snap-pac rsync efibootmgr bash-completion dkms lsb-release mkinitcpio-openswap"
name: "Bootstrapping Arch Linux (Netinstall)..."