mirror of https://github.com/koreader/koreader
Visual feedback around tar/zsync on Kobo during OTA updates (#4043)
* With a bonus version normalizer fix. * And a zsync bump/fix to avoid softlocks with OpenStack HTTP frontends (also, pull those from the OTA mirror list).pull/4050/head
parent
71ff69ec4f
commit
8089d916a5
@ -1 +1 @@
|
|||||||
Subproject commit 438014b1d901cacf8591354e8060b220b8a964bd
|
Subproject commit abe91abb0f4a2146a65ca131d323eb1d47760068
|
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# KOReader's working directory
|
||||||
|
KOREADER_DIR="/mnt/us/koreader"
|
||||||
|
|
||||||
|
# We do NOT want to sleep during eips calls!
|
||||||
|
export EIPS_NO_SLEEP="true"
|
||||||
|
|
||||||
|
# Load our helper functions...
|
||||||
|
if [ -f "${KOREADER_DIR}/libkohelper.sh" ]; then
|
||||||
|
# shellcheck source=/dev/null
|
||||||
|
. "${KOREADER_DIR}/libkohelper.sh"
|
||||||
|
else
|
||||||
|
echo "Can't source helper functions, aborting!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
eips_print_bottom_centered "Computing zsync delta . . ." 3
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
## First arg is the checkpoint number, and we get one every 200 checkpoints.
|
||||||
|
CHECKPOINT_NUM="${1}"
|
||||||
|
CHECKPOINT_GRANULARITY="200"
|
||||||
|
|
||||||
|
# Use that to build a progress bar
|
||||||
|
PROGRESS_AMOUNT="$((CHECKPOINT_NUM / CHECKPOINT_GRANULARITY))"
|
||||||
|
|
||||||
|
# Which text do we want to use?
|
||||||
|
case "${2}" in
|
||||||
|
"create")
|
||||||
|
PROGRESS_BASE_STRING="Preparing local OTA package"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
PROGRESS_BASE_STRING="Updating KOReader"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# And start drawing the progress bar...
|
||||||
|
PROGRESS_STRING=""
|
||||||
|
for _ in $(seq 1 ${PROGRESS_AMOUNT}); do
|
||||||
|
# Fill the progress bar...
|
||||||
|
PROGRESS_STRING="${PROGRESS_STRING}."
|
||||||
|
done
|
||||||
|
|
||||||
|
# Print our progress :)
|
||||||
|
./fbink -q -y -7 -pmh "${PROGRESS_BASE_STRING}" "${PROGRESS_STRING}"
|
Loading…
Reference in New Issue