disable runtime behaviour changes on fdroid

reviewable/pr6305/r1
Martín Fdez 4 years ago committed by Frans de Jonge
parent d91d2d72d7
commit 8e61a8f285

@ -38,32 +38,32 @@ local function runUserScripts(dir, migration, parent)
end end
end end
-- run scripts once after an update of koreader, if android.prop.flavor ~= "fdroid" then
-- it can also trigger a recursive migration of user data -- run scripts once after an update of koreader,
local run_once_scripts = path .. "/koreader/scripts.afterupdate" -- it can also trigger a recursive migration of user data
if lfs.attributes(run_once_scripts, "mode") == "directory" then local run_once_scripts = path .. "/koreader/scripts.afterupdate"
local afterupdate_marker = android.dir .. "/afterupdate.marker" if lfs.attributes(run_once_scripts, "mode") == "directory" then
if lfs.attributes(afterupdate_marker, "mode") ~= nil then local afterupdate_marker = android.dir .. "/afterupdate.marker"
if lfs.attributes(run_once_scripts .. "/migrate", "mode") ~= nil then if lfs.attributes(afterupdate_marker, "mode") ~= nil then
android.LOGI("after-update: running migration") if lfs.attributes(run_once_scripts .. "/migrate", "mode") ~= nil then
runUserScripts(run_once_scripts, true) android.LOGI("after-update: running migration")
else runUserScripts(run_once_scripts, true)
android.LOGI("after-update: running shell scripts") else
runUserScripts(run_once_scripts) android.LOGI("after-update: running shell scripts")
end runUserScripts(run_once_scripts)
android.execute("rm", afterupdate_marker) end
android.execute("rm", afterupdate_marker)
end
end end
-- scripts executed every start of koreader, no migration here
local run_always_scripts = path .. "/koreader/scripts.always"
if lfs.attributes(run_always_scripts, "mode") == "directory" then
runUserScripts(run_always_scripts)
end
-- run koreader patch before koreader startup
pcall(dofile, path.."/koreader/patch.lua")
end end
-- scripts executed every start of koreader, no migration here
local run_always_scripts = path .. "/koreader/scripts.always"
if lfs.attributes(run_always_scripts, "mode") == "directory" then
runUserScripts(run_always_scripts)
end
-- run koreader patch before koreader startup
pcall(dofile, path.."/koreader/patch.lua")
-- 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.
-- Cf. <https://github.com/koreader/koreader/issues/5347#issuecomment-529476693>. -- Cf. <https://github.com/koreader/koreader/issues/5347#issuecomment-529476693>.

Loading…
Cancel
Save