mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-07-27 08:31:44 +08:00
update 2026-05-11 10:41:10
This commit is contained in:
parent
6d9d9986c0
commit
6cc27f4e26
@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=hysteria
|
||||
PKG_VERSION:=2.9.0
|
||||
PKG_VERSION:=2.9.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/apernet/hysteria/tar.gz/app/v$(PKG_VERSION)?
|
||||
PKG_HASH:=b2b394f0ac94a81483a9dca8bd395bf8d194117f8bbaa04e18156b149b2fdd33
|
||||
PKG_HASH:=0ac7f4eb6e355621770396aa42c4bdc36ece5e7f3f6c206a1c9053b850cb7a68
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-app-v$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-amlogic
|
||||
PKG_VERSION:=3.1.295
|
||||
PKG_VERSION:=3.1.298
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0 License
|
||||
|
||||
@ -7,7 +7,7 @@ config amlogic 'config'
|
||||
option amlogic_kernel_path 'https://github.com/ophub/kernel'
|
||||
option amlogic_kernel_tags ''
|
||||
option amlogic_kernel_branch ''
|
||||
option amlogic_plugin_branch ''
|
||||
option amlogic_plugin_branch 'main'
|
||||
option amlogic_firmware_config '1'
|
||||
option amlogic_write_bootloader '0'
|
||||
option amlogic_shared_fstype 'ext4'
|
||||
|
||||
@ -81,12 +81,23 @@ sleep 1
|
||||
get_plugin_info() {
|
||||
package_manager=""
|
||||
current_plugin_v=""
|
||||
current_plugin_release=""
|
||||
if command -v opkg >/dev/null 2>&1; then
|
||||
package_manager="ipk"
|
||||
current_plugin_v="$(opkg list-installed | grep '^luci-app-amlogic ' | awk '{print $3}' | cut -d'-' -f1)"
|
||||
# Full version string e.g. "3.1.295-1" or "3.1.295-2"
|
||||
local full_v
|
||||
full_v="$(opkg list-installed | grep '^luci-app-amlogic ' | awk '{print $3}')"
|
||||
current_plugin_v="$(echo "${full_v}" | cut -d'-' -f1)"
|
||||
current_plugin_release="$(echo "${full_v}" | cut -d'-' -f2)"
|
||||
elif command -v apk >/dev/null 2>&1; then
|
||||
package_manager="apk"
|
||||
current_plugin_v="$(apk list --installed | grep '^luci-app-amlogic-' | awk '{print $1}' | cut -d'-' -f4)"
|
||||
# Package name e.g. "luci-app-amlogic-3.1.295-r2"
|
||||
# Fields: luci(1) app(2) amlogic(3) 3.1.295(4) r2(5)
|
||||
local pkg_name
|
||||
pkg_name="$(apk list --installed | grep '^luci-app-amlogic-' | awk '{print $1}')"
|
||||
current_plugin_v="$(echo "${pkg_name}" | cut -d'-' -f4)"
|
||||
# Extract release number: "r2" -> "2"
|
||||
current_plugin_release="$(echo "${pkg_name}" | cut -d'-' -f5 | sed 's/^r//')"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -97,7 +108,7 @@ check_plugin() {
|
||||
if [[ -z "${package_manager}" || -z "${current_plugin_v}" ]]; then
|
||||
tolog "01.01 Plugin 'luci-app-amlogic' not found or package manager unknown." "1"
|
||||
else
|
||||
tolog "01.01 Using [${package_manager}]. Current version: ${current_plugin_v}"
|
||||
tolog "01.01 Using [${package_manager}]. Current version: ${current_plugin_v}, Release: ${current_plugin_release:-unknown}"
|
||||
fi
|
||||
sleep 2
|
||||
|
||||
@ -125,7 +136,22 @@ check_plugin() {
|
||||
tolog "02.01 Current version: ${current_plugin_v}, Latest version: ${latest_version}"
|
||||
sleep 2
|
||||
|
||||
if [[ "${current_plugin_v}" == "${latest_version}" ]]; then
|
||||
# Strip variant suffix (e.g. "-js") from latest_version to get the numeric part.
|
||||
latest_version_base="${latest_version%%-*}"
|
||||
|
||||
# Determine target PKG_RELEASE for the selected branch:
|
||||
# js branch -> release 2
|
||||
# lua branch -> release 1
|
||||
if [[ "${plugin_branch}" == "js" ]]; then
|
||||
target_release="2"
|
||||
else
|
||||
target_release="1"
|
||||
fi
|
||||
|
||||
# Only report "already latest" when BOTH the version number AND the installed
|
||||
# branch (PKG_RELEASE) match the selected branch. If the user switched branches
|
||||
# (same version number but different release), we still offer an update.
|
||||
if [[ "${current_plugin_v}" == "${latest_version_base}" && "${current_plugin_release}" == "${target_release}" ]]; then
|
||||
tolog "02.02 Already the latest version, no need to update." "1"
|
||||
else
|
||||
tolog '<input type="button" class="cbi-button cbi-button-reload" value="Download" onclick="return b_check_plugin(this, '"'download_${latest_version}'"')"/> Latest version: '${latest_version}'' "1"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user