rgnano: More aggressively update the "installed" version

The current code checks the date listed in the "Version" string
in rockbox-info.txt, and updates if the new package has a newer date.

However this is not granular enough, especially when you are iterating
multiple builds on a single day.  It also prevents downgrading to
an older build.

So, instead of checking for a newer date, apply the update if the new
version string (including the commit id) is merely *different* than the
installed one.

Change-Id: Ie5d10ffe011afd1efb3c76c77a3ed19d36df9321
This commit is contained in:
Solomon Peachy 2025-07-31 08:28:55 -04:00
parent 340273a74c
commit 06d03d8e28

View file

@ -11,10 +11,10 @@ if [ ! -d $RBDIR ]; then
cp -r ./install/* $RBDIR
notif clear
else
OPKV=$(cat ./install/rockbox-info.txt | grep Version: | cut -d'-' -f2)
SDV=$(cat $RBDIR/rockbox-info.txt | grep Version: | cut -d'-' -f2)
OPKV=$(cat ./install/rockbox-info.txt | grep Version)
SDV=$(cat $RBDIR/rockbox-info.txt | grep Version)
if [[ $OPKV -gt $SDV ]]; then
if [[ "$OPKV" != "$SDV" ]]; then
notif set 0 " Updating rockbox..."
cp -r -f -u ./install/* $RBDIR
notif clear