|
|
@ -38,6 +38,7 @@ local function runUserScripts(dir, migration, parent)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if android.prop.flavor ~= "fdroid" then
|
|
|
|
-- run scripts once after an update of koreader,
|
|
|
|
-- run scripts once after an update of koreader,
|
|
|
|
-- it can also trigger a recursive migration of user data
|
|
|
|
-- it can also trigger a recursive migration of user data
|
|
|
|
local run_once_scripts = path .. "/koreader/scripts.afterupdate"
|
|
|
|
local run_once_scripts = path .. "/koreader/scripts.afterupdate"
|
|
|
@ -54,15 +55,14 @@ if lfs.attributes(run_once_scripts, "mode") == "directory" then
|
|
|
|
android.execute("rm", afterupdate_marker)
|
|
|
|
android.execute("rm", afterupdate_marker)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
-- scripts executed every start of koreader, no migration here
|
|
|
|
-- scripts executed every start of koreader, no migration here
|
|
|
|
local run_always_scripts = path .. "/koreader/scripts.always"
|
|
|
|
local run_always_scripts = path .. "/koreader/scripts.always"
|
|
|
|
if lfs.attributes(run_always_scripts, "mode") == "directory" then
|
|
|
|
if lfs.attributes(run_always_scripts, "mode") == "directory" then
|
|
|
|
runUserScripts(run_always_scripts)
|
|
|
|
runUserScripts(run_always_scripts)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
-- run koreader patch before koreader startup
|
|
|
|
-- run koreader patch before koreader startup
|
|
|
|
pcall(dofile, path.."/koreader/patch.lua")
|
|
|
|
pcall(dofile, path.."/koreader/patch.lua")
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
-- Set proper permission for binaries.
|
|
|
|
-- Set proper permission for binaries.
|
|
|
|
--- @todo Take care of this on extraction instead.
|
|
|
|
--- @todo Take care of this on extraction instead.
|
|
|
|