libmediainfo,mediainfo: Use Custom termux_pkg_auto_update
This commit is contained in:
parent
e0633aaca7
commit
49454b17b7
|
@ -10,6 +10,29 @@ TERMUX_PKG_AUTO_UPDATE=true
|
|||
TERMUX_PKG_DEPENDS="libc++, libcurl, libzen, zlib"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-shared --enable-static --with-libcurl"
|
||||
|
||||
termux_pkg_auto_update() {
|
||||
local e=0
|
||||
local api_url="https://mediaarea.net/en/MediaInfo"
|
||||
local api_url_r=$(curl -s "${api_url}/")
|
||||
local rl=$(echo "${api_url_r}" | grep -o '"softwareVersion"\s*:\s*"\([^"]\+\)"')
|
||||
local latest_version=$(echo "${r1}" | grep -o '[0-9.]\+')
|
||||
|
||||
[[ -z "${api_url_r}" ]] && e=1
|
||||
[[ -z "${r1}" ]] && e=1
|
||||
[[ -z "${latest_version}" ]] && e=1
|
||||
if [[ "${e}" != 0 ]]; then
|
||||
cat <<- EOL >&2
|
||||
WARN: Auto update failure!
|
||||
api_url_r=${api_url_r}
|
||||
r1=${r1}
|
||||
latest_version=${latest_version}
|
||||
EOL
|
||||
return
|
||||
fi
|
||||
|
||||
termux_pkg_upgrade_version "${latest_version}"
|
||||
}
|
||||
|
||||
termux_step_pre_configure() {
|
||||
TERMUX_PKG_SRCDIR="${TERMUX_PKG_SRCDIR}/Project/GNU/Library"
|
||||
TERMUX_PKG_BUILDDIR="${TERMUX_PKG_SRCDIR}"
|
||||
|
|
|
@ -9,6 +9,29 @@ TERMUX_PKG_SHA256=ebeb1cb701a23059c736cb33b91a3172c4f98e7341e44a0b30a11919191a27
|
|||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
TERMUX_PKG_DEPENDS="libandroid-support, libc++, libmediainfo, libzen"
|
||||
|
||||
termux_pkg_auto_update() {
|
||||
local e=0
|
||||
local api_url="https://mediaarea.net/en/MediaInfo"
|
||||
local api_url_r=$(curl -s "${api_url}/")
|
||||
local rl=$(echo "${api_url_r}" | grep -o '"softwareVersion"\s*:\s*"\([^"]\+\)"')
|
||||
local latest_version=$(echo "${r1}" | grep -o '[0-9.]\+')
|
||||
|
||||
[[ -z "${api_url_r}" ]] && e=1
|
||||
[[ -z "${r1}" ]] && e=1
|
||||
[[ -z "${latest_version}" ]] && e=1
|
||||
if [[ "${e}" != 0 ]]; then
|
||||
cat <<- EOL >&2
|
||||
WARN: Auto update failure!
|
||||
api_url_r=${api_url_r}
|
||||
r1=${r1}
|
||||
latest_version=${latest_version}
|
||||
EOL
|
||||
return
|
||||
fi
|
||||
|
||||
termux_pkg_upgrade_version "${latest_version}"
|
||||
}
|
||||
|
||||
termux_step_pre_configure() {
|
||||
TERMUX_PKG_SRCDIR="${TERMUX_PKG_SRCDIR}/Project/GNU/CLI"
|
||||
TERMUX_PKG_BUILDDIR="${TERMUX_PKG_SRCDIR}"
|
||||
|
|
Loading…
Reference in New Issue