fix(termux_repology_api_get_latest_version.sh): return "Already up to date" for all repology update requests in the case if repology is unavailable or other error

https://github.com/termux/termux-packages/issues/18690#issuecomment-1855014477
This commit is contained in:
Twaik Yont 2023-12-17 13:08:29 +02:00
parent cd30faa73b
commit 093a038c6b
1 changed files with 2 additions and 1 deletions

View File

@ -20,7 +20,8 @@ termux_repology_api_get_latest_version() {
find /usr/lib/python3.* -name EXTERNALLY-MANAGED -print -quit | grep -q . ||
pip3 install bs4 requests >/dev/null # Install python dependencies.
python3 "${TERMUX_SCRIPTDIR}"/scripts/updates/api/dump-repology-data \
"${TERMUX_REPOLOGY_DATA_FILE}" >/dev/null
"${TERMUX_REPOLOGY_DATA_FILE}" >/dev/null || \
echo "{}" > ${TERMUX_REPOLOGY_DATA_FILE}
fi
local PKG_NAME="$1"