|
|
@ -7,9 +7,11 @@ KOREADER_DIR=/mnt/ext1/applications/koreader
|
|
|
|
# update to new version from OTA directory
|
|
|
|
# update to new version from OTA directory
|
|
|
|
NEWUPDATE="${KOREADER_DIR}/ota/koreader.updated.tar"
|
|
|
|
NEWUPDATE="${KOREADER_DIR}/ota/koreader.updated.tar"
|
|
|
|
INSTALLED="${KOREADER_DIR}/ota/koreader.installed.tar"
|
|
|
|
INSTALLED="${KOREADER_DIR}/ota/koreader.installed.tar"
|
|
|
|
if [ -f ${NEWUPDATE} ]; then
|
|
|
|
if [ -f "${NEWUPDATE}" ]; then
|
|
|
|
# TODO: any graphic indication for the updating progress?
|
|
|
|
# TODO: any graphic indication for the updating progress?
|
|
|
|
cd /mnt/ext1/ && tar xf ${NEWUPDATE} && mv ${NEWUPDATE} ${INSTALLED}
|
|
|
|
cd /mnt/ext1/ && tar xf "${NEWUPDATE}" --no-same-permissions --no-same-owner \
|
|
|
|
|
|
|
|
&& mv "${NEWUPDATE}" "${INSTALLED}"
|
|
|
|
|
|
|
|
rm -f "${NEWUPDATE}" # always purge newupdate in all cases to prevent update loop
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# we're always starting from our working directory
|
|
|
|
# we're always starting from our working directory
|
|
|
|