fixup previous commit

This commit is contained in:
Yaksh Bariya 2022-04-20 16:42:37 +05:30
parent 4f3c709d78
commit fd130685ae
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
6 changed files with 10 additions and 9 deletions

View File

@ -23,7 +23,7 @@ termux_pkg_auto_update() {
tag="$(termux_github_api_get_tag "${TERMUX_PKG_SRCURL}")"
# check if this is not an intermediate release candidate:
if grep -qP "^OTP-${TERMUX_PKG_UPDATE_VERSION_REGEXP}\$" <<<"$tag"; then
termux_pkg_upgrade_version "$tag"
pkg_dir=$(dirname "$0") termux_pkg_upgrade_version "$tag"
else
echo "WARNING: Skipping auto-update: Not stable release($tag)"
fi

View File

@ -16,7 +16,7 @@ termux_pkg_auto_update() {
tag="$(termux_github_api_get_tag "${TERMUX_PKG_SRCURL}")"
# check if this is not a c release:
if grep -qP "^cpp-${TERMUX_PKG_UPDATE_VERSION_REGEXP}\$" <<<"$tag"; then
termux_pkg_upgrade_version "$tag"
pkg_dir=$(dirname "$0") termux_pkg_upgrade_version "$tag"
else
echo "WARNING: Skipping auto-update: Not a cpp release($tag)"
fi

View File

@ -21,7 +21,7 @@ termux_pkg_auto_update() {
tag="$(termux_github_api_get_tag "${TERMUX_PKG_SRCURL}")"
# check if this is not a c++ release:
if grep -qP "^c-${TERMUX_PKG_UPDATE_VERSION_REGEXP}\$" <<<"$tag"; then
termux_pkg_upgrade_version "$tag"
pkg_dir=$(dirname "$0") termux_pkg_upgrade_version "$tag"
else
echo "WARNING: Skipping auto-update: Not a C release($tag)"
fi

View File

@ -63,7 +63,7 @@ termux_pkg_auto_update() {
# since we are using a nightly build, therefore no need to check for version increment/decrement.
if [ "${TERMUX_PKG_VERSION}" != "${remote_nvim_version}" ]; then
termux_pkg_upgrade_version "${remote_nvim_version}" --skip-version-check
pkg_dir=$(dirname "$0") termux_pkg_upgrade_version "${remote_nvim_version}" --skip-version-check
else
echo "INFO: No update available."
fi

View File

@ -97,7 +97,7 @@ _update() {
# Only update if auto update is enabled.
if [[ "${TERMUX_PKG_AUTO_UPDATE}" == "true" ]]; then
echo "INFO: Updating ${TERMUX_PKG_NAME} [Current version: ${TERMUX_PKG_VERSION}]..."
termux_pkg_auto_update
pkg_dir=${pkg_dir} termux_pkg_auto_update
echo # Newline.
fi
}

View File

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