From e90be01b6ddf7db0f58fd151b0028125159a9af3 Mon Sep 17 00:00:00 2001 From: Super Manito <68613938+SuperManito@users.noreply.github.com> Date: Thu, 1 Jan 2026 18:34:25 +0800 Subject: [PATCH] bug fix --- ChangeMirrors.sh | 4 ++-- DockerInstallation.sh | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ChangeMirrors.sh b/ChangeMirrors.sh index bf3cc5c..73468c1 100755 --- a/ChangeMirrors.sh +++ b/ChangeMirrors.sh @@ -1,6 +1,6 @@ #!/bin/bash ## Author: SuperManito -## Modified: 2025-12-11 +## Modified: 2026-01-01 ## License: MIT ## GitHub: https://github.com/SuperManito/LinuxMirrors ## Website: https://linuxmirrors.cn @@ -1290,7 +1290,7 @@ function choose_mirrors() { if [[ -z "${tmp_result}" ]]; then echo -e "\n$WARN $(msg "warn.needValidNumberIndex")" else - SOURCE="$(echo "${tmp_result}" | awk -F '@' '{print$2}')" + SOURCE="${tmp_result}" break fi ;; diff --git a/DockerInstallation.sh b/DockerInstallation.sh index cd4d414..27016e8 100755 --- a/DockerInstallation.sh +++ b/DockerInstallation.sh @@ -1,6 +1,6 @@ #!/bin/bash ## Author: SuperManito -## Modified: 2025-12-06 +## Modified: 2026-01-01 ## License: MIT ## GitHub: https://github.com/SuperManito/LinuxMirrors ## Website: https://linuxmirrors.cn @@ -904,7 +904,7 @@ function choose_mirrors() { if [[ -z "${tmp_result}" ]]; then echo -e "\n$WARN $(msg "warn.needValidNumberIndex")" else - SOURCE="$(echo "${tmp_result}" | awk -F '@' '{print$2}')" + SOURCE="${tmp_result}" break fi ;; @@ -947,11 +947,11 @@ function choose_mirrors() { read -rp "${CHOICE_C}" INPUT case "${INPUT}" in [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) - local tmp_source="$(eval echo \${${mirror_list_name}[$(($INPUT - 1))]})" - if [[ -z "${tmp_source}" ]]; then + local tmp_result="$(eval echo \${${mirror_list_name}[$(($INPUT - 1))]})" + if [[ -z "${tmp_result}" ]]; then echo -e "\n$WARN $(msg "warn.needValidNumberIndex")" else - SOURCE_REGISTRY="$(eval echo \${${mirror_list_name}[$(($INPUT - 1))]} | awk -F '@' '{print$2}')" + SOURCE="${tmp_result}" break fi ;;