2015-10-03 06:18:47 +00:00
|
|
|
#!/bin/sh
|
|
|
|
export LC_ALL="en_US.UTF-8"
|
|
|
|
|
|
|
|
# working directory of koreader
|
|
|
|
KOREADER_DIR="${0%/*}"
|
|
|
|
|
|
|
|
# we're always starting from our working directory
|
2017-04-09 08:42:16 +00:00
|
|
|
cd "${KOREADER_DIR}" || exit
|
2015-10-03 06:18:47 +00:00
|
|
|
|
|
|
|
# export load library path for some old firmware
|
2020-02-02 19:35:21 +00:00
|
|
|
export LD_LIBRARY_PATH=${KOREADER_DIR}/libs:${LD_LIBRARY_PATH}
|
2015-10-03 06:18:47 +00:00
|
|
|
|
|
|
|
# export trained OCR data directory
|
|
|
|
export TESSDATA_PREFIX="data"
|
|
|
|
|
|
|
|
# export external font directory
|
2017-04-09 08:42:16 +00:00
|
|
|
export EXT_FONT_DIR="${HOME}/fonts"
|
2015-10-03 06:18:47 +00:00
|
|
|
|
|
|
|
# set fullscreen mode
|
|
|
|
export SDL_FULLSCREEN=1
|
|
|
|
|
2017-05-16 09:11:11 +00:00
|
|
|
RETURN_VALUE=85
|
|
|
|
|
2020-02-02 19:35:21 +00:00
|
|
|
while [ ${RETURN_VALUE} -eq 85 ]; do
|
2021-01-07 19:38:10 +00:00
|
|
|
./reader.lua -d
|
2017-05-16 09:11:11 +00:00
|
|
|
RETURN_VALUE=$?
|
|
|
|
done
|
|
|
|
|
2020-02-02 19:35:21 +00:00
|
|
|
exit ${RETURN_VALUE}
|