From 4e941e323e7ef653173f6211d69f5bd6a2428ab8 Mon Sep 17 00:00:00 2001 From: natemaia Date: Sun, 5 Feb 2023 10:37:17 -0800 Subject: [PATCH] Fix mirror countries when reflector fails --- installer | 88 ++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 74 insertions(+), 14 deletions(-) diff --git a/installer b/installer index d7a1552..0641ba0 100755 --- a/installer +++ b/installer @@ -6,7 +6,7 @@ # AIF, Calamares, and the Arch Wiki.. Credit where credit is due # shellcheck disable=2086,2046,2254,2164,2030,2031,2001 -VER=2.26 +VER=2.27 # default values { @@ -641,18 +641,78 @@ select_mirrors() [[ $mirrorpid && ! -f /tmp/mcountry ]] && wait $mirrorpid REF_COUNTRIES="$(< /tmp/mcountry)" - [[ $REF_COUNTRIES ]] || REF_COUNTRIES="Australia AU - Austria AT Bangladesh BD Belarus BY Belgium BE Bosnia and Herzegovina BA - Brazil BR Bulgaria BG Cambodia KH Canada CA Chile CL China CN Colombia CO - Croatia HR Czechia CZ Denmark DK Ecuador EC Estonia EE Finland FI France FR - Georgia GE Germany DE Greece GR Hong Kong HK Hungary HU Iceland IS India IN - Indonesia ID Iran IR Ireland IE Israel IL Italy IT Japan JP Kazakhstan KZ - Kenya KE Latvia LV Lithuania LT Luxembourg LU Mexico MX Moldova MD Monaco MC - Netherlands NL New Caledonia NC New Zealand NZ North Macedonia MK Norway NO - Pakistan PK Paraguay PY Poland PL Portugal PT Romania RO Russia RU RĂ©union RE - Serbia RS Singapore SG Slovakia SK Slovenia SI South Africa ZA South Korea KR - Spain ES Sweden SE Switzerland CH Taiwan TW Thailand TH Turkey TR Ukraine UA - United Kingdom GB United States US Vietnam VN" + [[ $REF_COUNTRIES ]] || REF_COUNTRIES="Argentina AR + Australia AU + Austria AT + Azerbaijan AZ + Bangladesh BD + Belarus BY + Belgium BE + Bosnia and Herzegovina BA + Brazil BR + Bulgaria BG + Cambodia KH + Canada CA + Chile CL + China CN + Colombia CO + Croatia HR + Czechia CZ + Denmark DK + Ecuador EC + Estonia EE + Finland FI + France FR + Georgia GE + Germany DE + Greece GR + Hong Kong HK + Hungary HU + Iceland IS + India IN + Indonesia ID + Iran IR + Ireland IE + Israel IL + Italy IT + Japan JP + Kazakhstan KZ + Kenya KE + Latvia LV + Lithuania LT + Luxembourg LU + Mexico MX + Moldova MD + Monaco MC + Netherlands NL + New Caledonia NC + New Zealand NZ + North Macedonia MK + Norway NO + Pakistan PK + Paraguay PY + Poland PL + Portugal PT + Romania RO + Russia RU + RĂ©union RE + Serbia RS + Singapore SG + Slovakia SK + Slovenia SI + South Africa ZA + South Korea KR + Spain ES + Sweden SE + Switzerland CH + Taiwan TW + Thailand TH + Turkey TR + Ukraine UA + United Kingdom GB + United States US + Uzbekistan UZ + Vietnam VN" # build an associative array of country codes mapped to full names eval "typeset -A COUNTRIES=( $(awk '{ @@ -718,7 +778,7 @@ select_sessions() [[ $INSTALL_WMS ]] || return 0 if [[ $INSTALL_WMS =~ dwm ]]; then - msg "DWM Install" "\nThe following programs be installed with \`git clone .. && make install\` from /home/$NEWUSER/suckless\n\n\t- dwm\n\t- dmenu\n\t- st\n" + msg "DWM Install" "\nThe following programs be installed using\n\n \`git clone .. && make install\`\n\nfrom /home/$NEWUSER/suckless\n\n - dwm\n - dmenu\n - st\n" fi for i in ${INSTALL_WMS/dwm/}; do pkgs+=("$i")