enable fbink feedback during OTA updates

pull/4325/head
Martín Fdez 6 years ago committed by Frans de Jonge
parent 4ae43aee2c
commit acfd21112f

@ -13,7 +13,7 @@ ko_update_check() {
NEWUPDATE="${KOREADER_DIR}/ota/koreader.updated.tar" NEWUPDATE="${KOREADER_DIR}/ota/koreader.updated.tar"
INSTALLED="${KOREADER_DIR}/ota/koreader.installed.tar" INSTALLED="${KOREADER_DIR}/ota/koreader.installed.tar"
if [ -f "${NEWUPDATE}" ]; then if [ -f "${NEWUPDATE}" ]; then
#./fbink -q -y -7 -pmh "Updating KOReader" ./fbink -q -y -7 -pmh "Updating KOReader"
# NOTE: See frontend/ui/otamanager.lua for a few more details on how we squeeze a percentage out of tar's checkpoint feature # NOTE: See frontend/ui/otamanager.lua for a few more details on how we squeeze a percentage out of tar's checkpoint feature
# NOTE: %B should always be 512 in our case, so let stat do part of the maths for us instead of using %s ;). # NOTE: %B should always be 512 in our case, so let stat do part of the maths for us instead of using %s ;).
FILESIZE="$(stat -c %b "${NEWUPDATE}")" FILESIZE="$(stat -c %b "${NEWUPDATE}")"
@ -25,12 +25,12 @@ ko_update_check() {
# Cleanup behind us... # Cleanup behind us...
if [ "${fail}" -eq 0 ]; then if [ "${fail}" -eq 0 ]; then
mv "${NEWUPDATE}" "${INSTALLED}" mv "${NEWUPDATE}" "${INSTALLED}"
# ./fbink -q -y -6 -pm "Update successful :)" ./fbink -q -y -6 -pm "Update successful :)"
# ./fbink -q -y -5 -pm "KOReader will start momentarily . . ." ./fbink -q -y -5 -pm "KOReader will start momentarily . . ."
#else else
# # Huh ho... # Huh ho...
# ./fbink -q -y -6 -pmh "Update failed :(" ./fbink -q -y -6 -pmh "Update failed :("
# ./fbink -q -y -5 -pm "KOReader may fail to function properly!" ./fbink -q -y -5 -pm "KOReader may fail to function properly!"
fi fi
rm -f "${NEWUPDATE}" # always purge newupdate in all cases to prevent update loop rm -f "${NEWUPDATE}" # always purge newupdate in all cases to prevent update loop
unset BLOCKS CPOINTS unset BLOCKS CPOINTS

Loading…
Cancel
Save