mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
* 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).
29 lines
715 B
Bash
Executable File
29 lines
715 B
Bash
Executable File
#!/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}"
|