fix ota update for PocketBook

pull/1394/head
chrox 9 years ago
parent 917f45a5ba
commit c11a2bbf1e

@ -210,6 +210,9 @@ pbupdate: all
$(INSTALL_DIR)/applications/koreader/ota/package.index $(INSTALL_DIR)/applications/koreader/ota/package.index
echo "applications/koreader/ota/package.index" >> \ echo "applications/koreader/ota/package.index" >> \
$(INSTALL_DIR)/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 # update index file in zip package
cd $(INSTALL_DIR) && zip -u ../koreader-pocketbook-$(MACHINE)-$(VERSION).zip \ cd $(INSTALL_DIR) && zip -u ../koreader-pocketbook-$(MACHINE)-$(VERSION).zip \
applications/koreader/ota/package.index applications/koreader/ota/package.index

@ -5,7 +5,7 @@ local _ = require("gettext")
local common_info = {} 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") local OTAManager = require("ui/otamanager")
table.insert(common_info, OTAManager:getOTAMenuTable()) table.insert(common_info, OTAManager:getOTAMenuTable())
end end

@ -73,17 +73,8 @@ function NetworkMgr:promptWifiOff()
end end
function NetworkMgr:getWifiStatus() function NetworkMgr:getWifiStatus()
local default_string = io.popen("ip r | grep default") local socket = require("socket")
if not default_string then return false end return socket.dns.toip("www.google.com") ~= nil
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
end end
function NetworkMgr:setHTTPProxy(proxy) function NetworkMgr:setHTTPProxy(proxy)

@ -28,6 +28,8 @@ function OTAManager:getOTAModel()
return "kindle" return "kindle"
elseif Device:isKobo() then elseif Device:isKobo() then
return "kobo" return "kobo"
elseif Device:isPocketBook() then
return "pocketbook"
else else
return "" return ""
end end

Loading…
Cancel
Save