forked from notmarek/KOReaderIntegration
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathUninstall.sh
More file actions
18 lines (18 loc) · 1.24 KB
/
Uninstall.sh
File metadata and controls
18 lines (18 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
echo "Removing binaries from /mnt/us/KOI"
rm -rf /mnt/us/KOI
echo "Removing koreader_helper.sh from /mnt/us/koreader"
rm -f /mnt/us/koreader/koreader_helper.sh
echo "Unpatching KOReaders device.lua to exit correctly"
patch /mnt/us/koreader/device.lua --reverse < device.lua.patch
echo "Unregistering extractors"
sqlite3 /var/local/appreg.db "DELETE FROM properties WHERE handlerId = 'com.notmarek.extractor';"
sqlite3 /var/local/appreg.db "DELETE FROM associations WHERE handlerId = 'com.notmarek.extractor';"
sqlite3 /var/local/appreg.db "DELETE FROM extenstions WHERE ext = 'epub' or ext like 'fb2' or ext = 'fbz';"
sqlite3 /var/local/appreg.db "DELETE FROM mimetypes WHERE ext = 'epub' or ext like 'fb2' or ext = 'fbz';"
sqlite3 /var/local/appreg.db "DELETE FROM handlerIds WHERE handlerId = 'com.notmarek.extractor';"
echo "Unregistering KOReader integration"
sqlite3 /var/local/appreg.db "DELETE FROM properties WHERE handlerId = 'com.github.koreader.helper';"
sqlite3 /var/local/appreg.db "DELETE FROM associations WHERE handlerId = 'com.github.koreader.helper';"
sqlite3 /var/local/appreg.db "DELETE FROM handlerIds WHERE handlerId = 'com.github.koreader.helper';"
echo "Done! (ain't got no clue what will happen to your already indexed epub/fb2 files)"