fixup: fix hardcoded packages directory in termux_pkg_upgrade_version

This commit is contained in:
Yaksh Bariya 2022-04-20 16:23:47 +05:30
parent 5c1de5fe0e
commit be24cc6016
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
1 changed files with 4 additions and 5 deletions

View File

@ -3,14 +3,13 @@ termux_pkg_upgrade_version() {
if [[ "$#" -lt 1 ]]; then
# Show usage.
termux_error_exit <<-EndUsage
Usage: ${FUNCNAME[0]} LATEST_VERSION [--skip-version-check]
Usage: ${FUNCNAME[0]} /path/to/build.sh LATEST_VERSION [--skip-version-check]
EndUsage
fi
local LATEST_VERSION="$1"
local SKIP_VERSION_CHECK="${2:-}"
local PKG_DIR
PKG_DIR="${TERMUX_SCRIPTDIR}/packages/${TERMUX_PKG_NAME}"
local LATEST_VERSION="$2"
local SKIP_VERSION_CHECK="${3:-}"
local PKG_DIR=${TERMUX_SCRIPTDIR}/$(dirname $1)
local EPOCH
EPOCH="${TERMUX_PKG_VERSION%%:*}" # If there is no epoch, this will be the full version.