From 510a77e528988bac8e6033fd21dd8de1f88220c4 Mon Sep 17 00:00:00 2001 From: manuel Date: Sun, 7 Jul 2024 14:14:58 +0300 Subject: [PATCH] [eos-bash-shared] eos-update: changed output for option --check-mirrors-eos --- eos-update | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/eos-update b/eos-update index d077341..b62decd 100755 --- a/eos-update +++ b/eos-update @@ -22,7 +22,7 @@ Cmd() { # Show a command, run it, and exit on issues. } CheckYourEndeavourosMirrorlist() { - local -r mirrors=( + local -r mirrors=( # for downloading the latest endeavouros-mirrorlist package https://mirror.alpix.eu/endeavouros/repo/endeavouros/x86_64 # Germany https://mirror.moson.org/endeavouros/repo/endeavouros/x86_64 # Germany https://mirrors.gigenet.com/endeavouros/repo/endeavouros/x86_64 # United States @@ -64,13 +64,14 @@ CheckYourEndeavourosMirrorlist() { unsupported+=($lm) fi done - if [ ${#unsupported[@]} -eq 0 ] && [ ${#supported[@]} -gt 0 ] ; then - echo2 "==> Info: file $eml contains ${#supported[@]} supported mirrors." - elif [ ${#unsupported[@]} -ne 0 ] ; then - echo2 -e "==> Error: file $eml contains ${#unsupported[@]} unsupported mirror definitions:" - printf "%s\n" "${unsupported[@]}" | sed 's|^| -> |' - elif [ ${#supported[@]} -eq 0 ] ; then - echo2 -e "==> Error: file $eml does not contain supported mirror definitions." + echo2 "Statistics from file $eml:" + echo2 "* contains ${#supported[@]} known mirror definitions." + printf2 "* contains ${#unsupported[@]} unknown mirror definitions" + if [ ${#unsupported[@]} -eq 0 ] ; then + echo2 "." + else + echo2 ":" + printf "%s\n" "${unsupported[@]}" | sed 's|^| Server = |' fi rm -f $tmpfile return