Soon (hopefully), everyone will be able to reflash their iLiad. This means that shell scripts that modify the internal configuration won't be dangerous. To that effect, adding new viewers to the registry will be useful.
I've started playing with SED in order to add new viewers to the registry. I've tested this on my PC, but I forgot my iLiad at home. It seems to work pretty well. Does anyone have any comments, suggestions, etc, for my scripts? This is literally the first exposure I've had to sed, so it may look a bit ugly.
run.sh
Code:
#!/bin/sh
export scriptdir=`/usr/bin/dirname $0`
cd $scriptdir
cp /mnt/settings/er_registry.txt /mnt/settings/er_registry.txt.orig
sed -i -f update.sed /mnt/settings/er_registry.txt
update.sed
Code:
s\uaIDList=\uaIDList=FBREADER;\g
/uaIDList=/ {
a\
[FBREADER]\
category=viewer\
arguments=<FILENAME>\
exec=/usr/local/programs/FBReader/fbreader.sh\
xResourceName=sh\
channel=14\
extensions=chm;CHM;fb2;FB2;rtf;RTF;tcr;TCR;oeb;OEB
}
/EXTENSION_INFO/ {
a\
chm=/usr/share/contentlister/Icon_books.png\
CHM=/usr/share/contentlister/Icon_books.png\
rtf=/usr/share/contentlister/Icon_books.png\
RTF=/usr/share/contentlister/Icon_books.png\
fb2=/usr/share/contentlister/Icon_books.png\
FB2=/usr/share/contentlister/Icon_books.png\
tcr=/usr/share/contentlister/Icon_books.png\
TCR=/usr/share/contentlister/Icon_books.png\
oeb=/usr/share/contentlister/Icon_books.png\
OEB=/usr/share/contentlister/Icon_books.png
}
Once an update comes that gives everyone unbricking support, I'll release this as a package. Or, if you'd like it to install or to test, and have the developer's version of the unbricking package, send me a PM.