termux_step_setup_cgct_environment.sh: real repo search fix

This commit is contained in:
Ivan Max 2024-01-15 19:12:37 +03:00 committed by GitHub
parent 3dc3799290
commit 3297f2bd8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -12,8 +12,9 @@ termux_step_setup_cgct_environment() {
local PKG_DIR_SPLIT=(${PKG_DIR//// })
local REPO_NAME=""
for idx in ${!TERMUX_PACKAGES_DIRECTORIES[@]}; do
if [ "${TERMUX_PACKAGES_DIRECTORIES[$idx]}" = "${PKG_DIR_SPLIT[-3]}" ]; then
local LIST_PACKAGES_DIRECTORIES=(${TERMUX_PACKAGES_DIRECTORIES})
for idx in ${!LIST_PACKAGES_DIRECTORIES[@]}; do
if [ "${LIST_PACKAGES_DIRECTORIES[$idx]}" = "${PKG_DIR_SPLIT[-3]}" ]; then
REPO_NAME=$(echo "${TERMUX_REPO_URL[$idx]}" | sed -e 's%https://%%g' -e 's%http://%%g' -e 's%/%-%g')
if [ "$TERMUX_REPO_PKG_FORMAT" = "debian" ]; then
REPO_NAME+="-${TERMUX_REPO_DISTRIBUTION[$idx]}-Release"