termux-tools: pkg: fix occasional error in random mirror selection

Fix suggested by @agnostic-apollo.

Fixes https://github.com/termux/termux-packages/issues/9975.
This commit is contained in:
Henrik Grimler 2022-04-11 12:48:37 +02:00
parent afd580402c
commit f2f4bead04
No known key found for this signature in database
GPG Key ID: B0076E490B71616B
2 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://termux.org/
TERMUX_PKG_DESCRIPTION="Basic system tools for Termux"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.173
TERMUX_PKG_VERSION=0.174
TERMUX_PKG_SKIP_SRC_EXTRACT=true
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_ESSENTIAL=true

View File

@ -78,9 +78,9 @@ select_mirror() {
mirrors[12]="https://termux.mentality.rip/termux-main"
mirrors[11]="https://termux.astra.in.ua/apt/termux-main"
mirrors[10]="https://termux.librehat.com/apt/termux-main"
mirrors[ 9]="https://mirror.mwt.me/termux/main"
mirrors[ 8]="https://termux.sahilister.in/apt/termux-main"
mirrors[ 7]="https://plug-mirror.rcac.purdue.edu/termux/termux-main"
mirrors[9]="https://mirror.mwt.me/termux/main"
mirrors[8]="https://termux.sahilister.in/apt/termux-main"
mirrors[7]="https://plug-mirror.rcac.purdue.edu/termux/termux-main"
local current_mirror
current_mirror=$(grep -m 1 -P "^\s*deb\s+" @TERMUX_PREFIX@/etc/apt/sources.list | grep -oP 'https?://[^\s]+')