2
0
mirror of https://github.com/koreader/koreader synced 2024-11-13 19:11:25 +00:00
koreader/kindle/kotar_cpoint

32 lines
844 B
Plaintext
Raw Normal View History

#!/bin/sh
2014-08-01 17:24:38 +00:00
# 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
source "${KOREADER_DIR}/libkohelper.sh"
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
2014-08-01 17:24:38 +00:00
# Print our progress :)
eips_print_bottom_centered "${PROGRESS_STRING}" 1