termux-tools: pkg: ensure that pkgcache exists before attempting to check modification time
This commit is contained in:
parent
94540654db
commit
f7142c23db
@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://termux.com/
|
||||
TERMUX_PKG_DESCRIPTION="Basic system tools for Termux"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=0.129
|
||||
TERMUX_PKG_VERSION=0.130
|
||||
TERMUX_PKG_SKIP_SRC_EXTRACT=true
|
||||
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
||||
TERMUX_PKG_ESSENTIAL=true
|
||||
|
@ -90,7 +90,7 @@ select_mirror() {
|
||||
|
||||
# Mirrors are rotated if 6 hours timeout has been passed or mirror is no longer accessible.
|
||||
local pkgcache="@TERMUX_CACHE_DIR@/apt/pkgcache.bin"
|
||||
if (( $(last_modified "$pkgcache") <= 6 * 3600 )); then
|
||||
if [ -e "$pkgcache" ] && (( $(last_modified "$pkgcache") <= 6 * 3600 )); then
|
||||
if [ -n "$current_mirror" ]; then
|
||||
echo -n "Checking availability of current mirror: "
|
||||
if check_mirror "$current_mirror"; then
|
||||
|
Loading…
Reference in New Issue
Block a user