mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
fix ota update for PocketBook
This commit is contained in:
3
Makefile
3
Makefile
@@ -210,6 +210,9 @@ pbupdate: all
|
||||
$(INSTALL_DIR)/applications/koreader/ota/package.index
|
||||
echo "applications/koreader/ota/package.index" >> \
|
||||
$(INSTALL_DIR)/applications/koreader/ota/package.index
|
||||
# hack file path when running tar in parent directory of koreader
|
||||
sed -i -e 's/^/..\//' \
|
||||
$(INSTALL_DIR)/applications/koreader/ota/package.index
|
||||
# update index file in zip package
|
||||
cd $(INSTALL_DIR) && zip -u ../koreader-pocketbook-$(MACHINE)-$(VERSION).zip \
|
||||
applications/koreader/ota/package.index
|
||||
|
||||
@@ -5,7 +5,7 @@ local _ = require("gettext")
|
||||
|
||||
local common_info = {}
|
||||
|
||||
if Device:isKindle() or Device:isKobo() then
|
||||
if Device:isKindle() or Device:isKobo() or Device:isPocketBook() then
|
||||
local OTAManager = require("ui/otamanager")
|
||||
table.insert(common_info, OTAManager:getOTAMenuTable())
|
||||
end
|
||||
|
||||
@@ -73,17 +73,8 @@ function NetworkMgr:promptWifiOff()
|
||||
end
|
||||
|
||||
function NetworkMgr:getWifiStatus()
|
||||
local default_string = io.popen("ip r | grep default")
|
||||
if not default_string then return false end
|
||||
local result = default_string:read()
|
||||
default_string:close()
|
||||
if result ~= nil then
|
||||
local gateway = string.match(result,"%d+.%d+.%d+.%d+")
|
||||
if gateway and os.execute("ping -q -c1 "..gateway) == 0 then
|
||||
return true
|
||||
end -- ping to gateway
|
||||
end -- test for empty string
|
||||
return false
|
||||
local socket = require("socket")
|
||||
return socket.dns.toip("www.google.com") ~= nil
|
||||
end
|
||||
|
||||
function NetworkMgr:setHTTPProxy(proxy)
|
||||
|
||||
@@ -28,6 +28,8 @@ function OTAManager:getOTAModel()
|
||||
return "kindle"
|
||||
elseif Device:isKobo() then
|
||||
return "kobo"
|
||||
elseif Device:isPocketBook() then
|
||||
return "pocketbook"
|
||||
else
|
||||
return ""
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user