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
|
|
|
|
export LD_LIBRARY_PATH=${KOREADER_DIR}/libs:$LD_LIBRARY_PATH
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
while [ $RETURN_VALUE -eq 85 ]; do
|
|
|
|
./reader.lua -d ~/Documents
|
|
|
|
RETURN_VALUE=$?
|
|
|
|
done
|
|
|
|
|
|
|
|
exit $RETURN_VALUE
|