fixup previous commit
This commit is contained in:
parent
4f3c709d78
commit
fd130685ae
|
@ -23,7 +23,7 @@ termux_pkg_auto_update() {
|
||||||
tag="$(termux_github_api_get_tag "${TERMUX_PKG_SRCURL}")"
|
tag="$(termux_github_api_get_tag "${TERMUX_PKG_SRCURL}")"
|
||||||
# check if this is not an intermediate release candidate:
|
# check if this is not an intermediate release candidate:
|
||||||
if grep -qP "^OTP-${TERMUX_PKG_UPDATE_VERSION_REGEXP}\$" <<<"$tag"; then
|
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
|
else
|
||||||
echo "WARNING: Skipping auto-update: Not stable release($tag)"
|
echo "WARNING: Skipping auto-update: Not stable release($tag)"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -16,7 +16,7 @@ termux_pkg_auto_update() {
|
||||||
tag="$(termux_github_api_get_tag "${TERMUX_PKG_SRCURL}")"
|
tag="$(termux_github_api_get_tag "${TERMUX_PKG_SRCURL}")"
|
||||||
# check if this is not a c release:
|
# check if this is not a c release:
|
||||||
if grep -qP "^cpp-${TERMUX_PKG_UPDATE_VERSION_REGEXP}\$" <<<"$tag"; then
|
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
|
else
|
||||||
echo "WARNING: Skipping auto-update: Not a cpp release($tag)"
|
echo "WARNING: Skipping auto-update: Not a cpp release($tag)"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -21,7 +21,7 @@ termux_pkg_auto_update() {
|
||||||
tag="$(termux_github_api_get_tag "${TERMUX_PKG_SRCURL}")"
|
tag="$(termux_github_api_get_tag "${TERMUX_PKG_SRCURL}")"
|
||||||
# check if this is not a c++ release:
|
# check if this is not a c++ release:
|
||||||
if grep -qP "^c-${TERMUX_PKG_UPDATE_VERSION_REGEXP}\$" <<<"$tag"; then
|
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
|
else
|
||||||
echo "WARNING: Skipping auto-update: Not a C release($tag)"
|
echo "WARNING: Skipping auto-update: Not a C release($tag)"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -63,7 +63,7 @@ termux_pkg_auto_update() {
|
||||||
|
|
||||||
# since we are using a nightly build, therefore no need to check for version increment/decrement.
|
# since we are using a nightly build, therefore no need to check for version increment/decrement.
|
||||||
if [ "${TERMUX_PKG_VERSION}" != "${remote_nvim_version}" ]; then
|
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
|
else
|
||||||
echo "INFO: No update available."
|
echo "INFO: No update available."
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -97,7 +97,7 @@ _update() {
|
||||||
# Only update if auto update is enabled.
|
# Only update if auto update is enabled.
|
||||||
if [[ "${TERMUX_PKG_AUTO_UPDATE}" == "true" ]]; then
|
if [[ "${TERMUX_PKG_AUTO_UPDATE}" == "true" ]]; then
|
||||||
echo "INFO: Updating ${TERMUX_PKG_NAME} [Current version: ${TERMUX_PKG_VERSION}]..."
|
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.
|
echo # Newline.
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,13 +3,14 @@ termux_pkg_upgrade_version() {
|
||||||
if [[ "$#" -lt 1 ]]; then
|
if [[ "$#" -lt 1 ]]; then
|
||||||
# Show usage.
|
# Show usage.
|
||||||
termux_error_exit <<-EndUsage
|
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
|
EndUsage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local LATEST_VERSION="$2"
|
local LATEST_VERSION="$1"
|
||||||
local SKIP_VERSION_CHECK="${3:-}"
|
local SKIP_VERSION_CHECK="${2:-}"
|
||||||
local PKG_DIR=${TERMUX_SCRIPTDIR}/$(dirname $1)
|
local PKG_DIR
|
||||||
|
PKG_DIR="${pkg_dir}"
|
||||||
|
|
||||||
local EPOCH
|
local EPOCH
|
||||||
EPOCH="${TERMUX_PKG_VERSION%%:*}" # If there is no epoch, this will be the full version.
|
EPOCH="${TERMUX_PKG_VERSION%%:*}" # If there is no epoch, this will be the full version.
|
||||||
|
|
Loading…
Reference in New Issue