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.
32 lines
844 B
Plaintext
32 lines
844 B
Plaintext
10 years ago
|
#!/bin/sh
|
||
|
|
||
10 years ago
|
# KOReader's working directory
|
||
10 years ago
|
KOREADER_DIR="/mnt/us/koreader"
|
||
|
|
||
10 years ago
|
# We do NOT want to sleep during eips calls!
|
||
|
export EIPS_NO_SLEEP="true"
|
||
|
|
||
10 years ago
|
# Load our helper functions...
|
||
10 years ago
|
if [ -f "${KOREADER_DIR}/libkohelper.sh" ] ; then
|
||
|
source "${KOREADER_DIR}/libkohelper.sh"
|
||
10 years ago
|
else
|
||
|
echo "Can't source helper functions, aborting!"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
|
||
|
## First arg is the chekpoint number, and we get one every 200 checkpoints.
|
||
|
CHECKPOINT_NUM="${1}"
|
||
|
CHECKPOINT_GRANULARITY="200"
|
||
|
|
||
|
# Use that to build a poor man's progress bar, with dots.
|
||
|
PROGRESS_AMOUNT="$(( ${CHECKPOINT_NUM} / ${CHECKPOINT_GRANULARITY} ))"
|
||
|
PROGRESS_STRING="Updating koreader "
|
||
|
for foo in $( seq 1 ${PROGRESS_AMOUNT} ) ; do
|
||
|
# Append a dot until we hit the needed amount
|
||
|
PROGRESS_STRING="${PROGRESS_STRING}."
|
||
|
done
|
||
|
|
||
10 years ago
|
# Print our progress :)
|
||
10 years ago
|
eips_print_bottom_centered "${PROGRESS_STRING}" 1
|