View Single Post
Old 04-25-2015, 04:50 AM   #195
Markismus
Guru
Markismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicing
 
Markismus's Avatar
 
Posts: 959
Karma: 149907
Join Date: Jul 2013
Location: Rotterdam
Device: HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
@Tshering
I found that the OTA update of koreader was broken after I moved koreader to /mnt/onboard/.apps. See issue #1387 at koreader on github.

Apparently KSM overwrites the koreader.sh script to adapt it to the new path with one slight oversight on line 12:
Code:
cd /mnt/onboard/.kobo && tar xf $NEWUPDATE && mv $NEWUPDATE $INSTALLED
should be changed to:
Code:
    cd $(dirname $KOREADER_DIR) && tar xf $NEWUPDATE && mv $NEWUPDATE $INSTALLED
Since the latest nightly (v187) those lines have been changed in the koreader distribution. So your update would only have to be done for the older (stable) revisions of koreader.

Now I can't find the string $(dirname $0) anywhere but in koreader_debug.sh, so I have no idea where I could change KSM to function properly. Could you help me with this, please?

EDIT:
I think I found your code in start_koreader.sh:
Code:
if [ $(grep -c  'KOREADER_DIR=/mnt/onboard/.kobo/koreader' $koreadersh) -gt 0 ]; then
    sed -i "s:KOREADER_DIR=/mnt/onboard/.kobo/koreader:KOREADER_DIR=\$(dirname \$0):" $koreadersh
fi
However, this shouldn't work on the new koreader.sh. So I am a bit at a loss, here.

EDIT EDIT:

I've changed koreader.sh back, changed your code to contain two sed expressions and now it updates:
Code:
if [ $(grep -c  'KOREADER_DIR=/mnt/onboard/.kobo/koreader' $koreadersh) -gt 0 ]; then
    sed -i "s:KOREADER_DIR=/mnt/onboard/.kobo/koreader:KOREADER_DIR=\$(dirname \$0):" $koreadersh
    sed -i "s:cd /mnt/onboard/.kobo:cd \$(dirname \$KOREADER_DIR):" $koreadersh
fi
Still don't get what triggered the change of the new koreader.sh. Your grep command shouldn't have found that string anymore, right?

Last edited by Markismus; 04-25-2015 at 07:08 AM.
Markismus is offline   Reply With Quote