update 2024-04-22 20:10:29

This commit is contained in:
actions-user 2024-04-22 20:10:29 +08:00
parent c01da4d0e8
commit cdf35510a5
2 changed files with 9 additions and 3 deletions

View File

@ -16,7 +16,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-amlogic
PKG_VERSION:=3.1.230
PKG_VERSION:=3.1.232
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0 License

View File

@ -132,8 +132,14 @@ kernel_tag="${kernel_tag/kernel_/}"
check_kernel() {
# 02. Query local version information
tolog "02. Start checking the kernel version."
# 02.01 Query the current version
current_kernel_v=$(uname -r 2>/dev/null | grep -oE '^[1-9]\.[0-9]{1,2}\.[0-9]+')
if [[ "${kernel_tag}" == "rk3588" || "${kernel_tag}" == "rk35xx" ]]; then
current_kernel_v=$(uname -r 2>/dev/null)
else
current_kernel_v=$(uname -r 2>/dev/null | grep -oE '^[1-9]\.[0-9]{1,2}\.[0-9]+')
fi
[[ -n "${current_kernel_v}" ]] || tolog "02.01 The current kernel version is not detected." "1"
tolog "02.01 current version: ${current_kernel_v}"
sleep 2
@ -159,7 +165,7 @@ check_kernel() {
latest_version="$(
curl -fsSL -m 10 \
${kernel_api}/releases/expanded_assets/kernel_${kernel_tag} |
grep -oE "${main_line_version}.[0-9]+.tar.gz" | sed 's/.tar.gz//' |
grep -oE "${main_line_version}.[0-9]+.*.tar.gz" | sed 's/.tar.gz//' |
sort -urV | head -n 1
)"
[[ -n "${latest_version}" ]] || tolog "02.03 No kernel available, please use another kernel branch." "1"