diff options
| author | Nippy <nippy@Beller-Mac-mini.lan> | 2026-11-06 21:59:21 +0100 |
|---|---|---|
| committer | Nippy <nippy@Beller-Mac-mini.lan> | 2026-11-06 21:59:21 +0100 |
| commit | f362c25c3f5df3ed061ff8a3c5834ad78336de45 (patch) | |
| tree | dd20d0fd1b7f0cbd94a03de867677d2f902ae847 /releng/airootfs/usr/local/bin/raveos-telepito-frissites | |
| parent | 6ebbda22c17e2b8afe5b4b9c0b4d01b5b77995ff (diff) | |
| download | RaveOS-build-iso-f362c25c3f5df3ed061ff8a3c5834ad78336de45.tar.gz RaveOS-build-iso-f362c25c3f5df3ed061ff8a3c5834ad78336de45.zip | |
test
Diffstat (limited to 'releng/airootfs/usr/local/bin/raveos-telepito-frissites')
| -rwxr-xr-x | releng/airootfs/usr/local/bin/raveos-telepito-frissites | 48 |
1 files changed, 35 insertions, 13 deletions
diff --git a/releng/airootfs/usr/local/bin/raveos-telepito-frissites b/releng/airootfs/usr/local/bin/raveos-telepito-frissites index b763885..9254448 100755 --- a/releng/airootfs/usr/local/bin/raveos-telepito-frissites +++ b/releng/airootfs/usr/local/bin/raveos-telepito-frissites @@ -7,22 +7,38 @@ MENTES=/tmp/calamares-elozo.tar LISTA=/tmp/calamares-elozo.lista REPOCONF=/tmp/raveos-csak-repo.conf -exec > >(tee -a "$NAPLO") 2>&1 -echo "== RaveOS telepito frissites: $(date)" +ZOLD=$'\e[38;2;106;168;79m' +HALVANY=$'\e[38;2;140;150;158m' +SARGA=$'\e[38;2;214;158;46m' +ALAP=$'\e[0m' + +exec 3>&1 +exec >>"$NAPLO" 2>&1 +echo "== RaveOS installer update: $(date)" + +kiir() { + printf '%s\n' "$2" + printf ' %s%s%s\n' "$1" "$2" "$ALAP" >&3 +} + +printf '\e[?25l\n %sRaveOS Installer%s\n %sChecking for the latest installer version%s\n\n' "$ZOLD" "$ALAP" "$HALVANY" "$ALAP" >&3 van_net() { curl -fsI --max-time 6 https://page.rp1.hu/x86_64/ >/dev/null || curl -fsI --max-time 6 https://rp1.hu/ >/dev/null } +kiir "$HALVANY" "Checking internet connection..." for _ in $(seq 1 10); do van_net && break sleep 2 done if ! van_net; then - echo "Nincs internet. Valassz wifi halozatot a listabol (Esc: kihagyas)." + kiir "$SARGA" "No internet connection. Choose a Wi-Fi network from the list (Esc: skip)." sleep 2 + printf '\e[?25h' >&3 nmtui-connect </dev/tty >/dev/tty 2>&1 + printf '\e[?25l\e[2J\e[H\n' >&3 for _ in $(seq 1 10); do van_net && break sleep 2 @@ -30,7 +46,7 @@ if ! van_net; then fi if ! van_net; then - echo "Nincs internet, a telepito a meglevo verzioval indul." + kiir "$SARGA" "No internet connection, starting the installer as is." sleep 2 exit 0 fi @@ -42,19 +58,25 @@ done sed -n '1,/^\[core\]/p' /etc/pacman.conf | sed '$d' > "$REPOCONF" -if ! timeout 60 pacman --config "$REPOCONF" -Sy; then - echo "A RaveOS repo nem erheto el, a telepito a meglevo verzioval indul." +kiir "$HALVANY" "Checking for updates..." +if ! timeout 60 pacman --config "$REPOCONF" --noprogressbar -Sy; then + kiir "$SARGA" "The RaveOS repository is not reachable, starting the installer as is." sleep 2 exit 0 fi FRISS=$(pacman --config "$REPOCONF" -Qu "${CSOMAGOK[@]}" 2>/dev/null) if [ -z "$FRISS" ]; then - echo "A telepito naprakesz." + kiir "$ZOLD" "The installer is up to date." + sleep 1 exit 0 fi -echo "Elerheto frissites:" +echo "Available updates:" echo "$FRISS" +kiir "$HALVANY" "Installing update:" +while IFS= read -r sor; do + kiir "$HALVANY" " $sor" +done <<< "$FRISS" { pacman -Qlq "${CSOMAGOK[@]}" | grep -v '/$' @@ -65,7 +87,7 @@ echo "$FRISS" tar -cf "$MENTES" -C / -T "$LISTA" 2>/dev/null visszaallit() { - echo "$1" + kiir "$SARGA" "$1" rm -f /var/lib/pacman/db.lck pacman -Qlq "${CSOMAGOK[@]}" 2>/dev/null | grep -v '/$' | sed 's#^/##' | sort > "$LISTA.uj" comm -13 "$LISTA" "$LISTA.uj" | while IFS= read -r f; do rm -f "/$f"; done @@ -77,13 +99,13 @@ visszaallit() { exit 0 } -if ! timeout 180 pacman --config "$REPOCONF" -S --needed --noconfirm "${CSOMAGOK[@]}"; then - visszaallit "A frissites nem sikerult, visszaallitas." +if ! timeout 180 pacman --config "$REPOCONF" --noprogressbar -S --needed --noconfirm "${CSOMAGOK[@]}"; then + visszaallit "The update failed, starting the installer as is." fi if ldd /usr/bin/calamares /usr/lib/libcalamares*.so* /usr/lib/calamares/modules/*/*.so 2>&1 | grep -q "not found"; then - visszaallit "Az uj telepito hianyzo konyvtarat igenyel, visszaallitas a regi verziora." + visszaallit "The new installer is missing a library, starting the previous version." fi -echo "A telepito frissitve." +kiir "$ZOLD" "The installer has been updated." sleep 1 |