fix missing

pull/279/head
cronyx 2022-07-26 23:27:47 +03:00
parent befd9e4f83
commit 14e7dc6ebc
1 changed files with 12 additions and 12 deletions
general/overlay/usr/sbin

View File

@ -112,19 +112,19 @@ free_resources() {
self_update() {
if echo ${args} | grep "rootfs" || echo ${args} | grep "kernel" > /dev/null 2>&1; then
echo "Offline upgrade, skip sysupgrade version check."
echo "Offline upgrade, skip sysupgrade version check."
else
echo "Online upgrade, checking sysupgrade version..."
curl -s -k -L -o /tmp/sysupgrade "https://raw.githubusercontent.com/cronyx/firmware/master/general/overlay/usr/sbin/sysupgrade"
dstv=`grep scr_version /tmp/sysupgrade | cut -f 2 -d '='`
if ! [ "${scr_version}" = "${dstv}" ]; then
echo "A new version is available, trying to update..."
mv /tmp/sysupgrade /usr/sbin/ ; chmod +x /usr/sbin/sysupgrade
echo "Done. Try running sysupgrade again."
exit 0
else
echo "Ok, version match."
fi
echo "Online upgrade, checking sysupgrade version..."
curl -s -k -L -o /tmp/sysupgrade "https://raw.githubusercontent.com/cronyx/firmware/master/general/overlay/usr/sbin/sysupgrade"
dstv=`grep scr_version /tmp/sysupgrade | head -1 | cut -f 2 -d '='`
if ! [ "${scr_version}" = "${dstv}" ]; then
echo "A new version is available, trying to update..."
mv /tmp/sysupgrade /usr/sbin/ ; chmod +x /usr/sbin/sysupgrade
echo "Done. Try running sysupgrade again."
exit 0
else
echo "Ok, version match."
fi
fi
}