Fix check version firmware

This commit is contained in:
CodeRoK7
2025-08-23 18:52:55 +00:00
parent f72be7e6c9
commit f5ff284f19

View File

@@ -1,8 +1,11 @@
#!/bin/sh
VERSION=$(ubus call system board | jsonfilter -e '@.release.description')
DESCRIPTION=$(ubus call system board | jsonfilter -e '@.release.description')
VERSION=$(ubus call system board | jsonfilter -e '@.release.version')
findKey="Routerich"
findVersion="24.10.2"
if echo "$VERSION" | grep -qi 'RouteRich'; then
if echo "$DESCRIPTION" | grep -qi -- "$findKey" && printf '%s\n%s\n' "$findVersion" "$VERSION" | sort -V | tail -n1 | grep -qx -- "$VERSION"; then
printf "\033[32;1mThis new firmware. Running new scprit...\033[0m\n"
wget --no-check-certificate -O /tmp/universal_config_new_podkop.sh https://raw.githubusercontent.com/routerich/RouterichAX3000_configs/refs/heads/beta_alt_test/universal_config_new_podkop.sh && chmod +x /tmp/universal_config_new_podkop.sh && /tmp/universal_config_new_podkop.sh $1 $2
else