Skip to content

Commit

Permalink
fix(root/fio): auto update
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin WIlliams <[email protected]>
  • Loading branch information
2096779623 committed Aug 15, 2024
1 parent d8850e3 commit e8ca5ea
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions root-packages/fio/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ TERMUX_PKG_DEPENDS="openssl, libandroid-shmem, libaio"
TERMUX_PKG_SUGGESTS="python"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_UPDATE_VERSION_REGEXP="\d+\.\d+"

termux_pkg_auto_update() {
local tag="$(termux_github_api_get_tag "${TERMUX_PKG_SRCURL}" "${TERMUX_PKG_UPDATE_TAG_TYPE}")"
if grep -qP "^lxml-${TERMUX_PKG_UPDATE_VERSION_REGEXP}\$" <<<"$tag"; then
termux_pkg_upgrade_version "$tag"
else
echo "WARNING: Skipping auto-update: Not stable release($tag)"
fi
}

termux_step_pre_configure() {
sed -i "s/@VERSION@/${TERMUX_PKG_VERSION}/g" $TERMUX_PKG_SRCDIR/Makefile
Expand Down

0 comments on commit e8ca5ea

Please sign in to comment.