diff --git a/KindleHIDPassthrough/install.sh b/KindleHIDPassthrough/install.sh index 9788cc4..8977b5c 100644 --- a/KindleHIDPassthrough/install.sh +++ b/KindleHIDPassthrough/install.sh @@ -38,6 +38,14 @@ mkdir -p "$INSTALL_DIR/cache" cp "$INSTALL_DIR/illusion/BTManager.sh" /mnt/us/documents/BTManager.sh chmod +x /mnt/us/documents/BTManager.sh +# ---- Install KOReader plugin (if KOReader is installed) ---- + +if [ -d /mnt/us/koreader/plugins/ ] && [ -d "$INSTALL_DIR/koreader-plugin/hidpassthrough.koplugin" ]; then + mkdir -p /mnt/us/koreader/plugins/hidpassthrough.koplugin + cp -r "$INSTALL_DIR/koreader-plugin/hidpassthrough.koplugin/." \ + /mnt/us/koreader/plugins/hidpassthrough.koplugin/ +fi + # ---- Start daemon ---- /sbin/initctl start hid-passthrough || true diff --git a/KindleHIDPassthrough/uninstall.sh b/KindleHIDPassthrough/uninstall.sh index 658b38c..63c43d3 100644 --- a/KindleHIDPassthrough/uninstall.sh +++ b/KindleHIDPassthrough/uninstall.sh @@ -31,6 +31,10 @@ DELETE FROM handlerIds WHERE handlerId='$APP_ID'; EOF fi +# ---- Remove KOReader plugin (if installed) ---- + +rm -rf /mnt/us/koreader/plugins/hidpassthrough.koplugin + # ---- Remove files ---- rm -rf "$INSTALL_DIR"