mirror of https://github.com/koreader/koreader
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
715 B
Bash
29 lines
715 B
Bash
#!/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}"
|