mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
Re-exec startup script on Kindle/Kobo when an OTA update is processed on startup (#4062)
So that we may properly pickup potential updates to the startup script itself.
This commit is contained in:
@@ -28,8 +28,13 @@ ko_update_check() {
|
||||
rm -f "${NEWUPDATE}" # always purge newupdate in all cases to prevent update loop
|
||||
fi
|
||||
}
|
||||
# NOTE: Keep doing an initial update check, in addition to one during the restart loop...
|
||||
# NOTE: Keep doing an initial update check, in addition to one during the restart loop, so we can pickup potential updates of this very script...
|
||||
ko_update_check
|
||||
# If an update happened, and was successful, reexec
|
||||
if [ -n "${fail}" ] && [ "${fail}" -eq 0 ]; then
|
||||
# By now, we know we're in the right directory, and our script name is pretty much set in stone, so we can forgo using $0
|
||||
exec ./koreader.sh "${@}"
|
||||
fi
|
||||
|
||||
# load our own shared libraries if possible
|
||||
export LD_LIBRARY_PATH="${KOREADER_DIR}/libs:${LD_LIBRARY_PATH}"
|
||||
|
||||
Reference in New Issue
Block a user