Mirror manager: shellcheck fixes
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QKxGW1raAWaqeU8WdHsMsp
This commit is contained in:
@@ -13,7 +13,8 @@ target="${1:?usage: omarchycn mirror apply <china|official|mirror-id>}"
|
||||
case "$target" in
|
||||
china)
|
||||
echo "Benchmarking China mirrors..."
|
||||
mapfile -t ranked < <(cn_mirror_rank $(cn_mirror_ids_by_region cn))
|
||||
mapfile -t cn_ids < <(cn_mirror_ids_by_region cn)
|
||||
mapfile -t ranked < <(cn_mirror_rank "${cn_ids[@]}")
|
||||
if (( ${#ranked[@]} == 0 )); then
|
||||
echo "No healthy China mirror reachable; keeping current mirrorlist" >&2
|
||||
exit 1
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# shellcheck shell=bash
|
||||
# Sourced helpers for omarchy-cn-mirror-* commands
|
||||
|
||||
CN_MIRRORS_JSON="$OMARCHY_PATH/cn/mirrors.json"
|
||||
|
||||
Reference in New Issue
Block a user