Verified Commit 9d2e3c86 authored by Karel Koci's avatar Karel Koci 🤘 Committed by Karel Koci
Browse files

localrepo: improve updater lua script

This makes localrepo.lua work with root_dir to be usable outside of current
root.  It also does not inserts localrepo.lua script unless it exists on
file system. This hides unnecessary warning that confuses users.
parent d1fb57d5
Pipeline #43062 passed with stage
in 4 minutes and 3 seconds
......@@ -2,5 +2,8 @@
This file is part of updater-ng-localrepo. Don't edit it.
]]
-- Add local repositories (might be missing if not installed or used)
Script("localrepo", "file:///usr/share/updater/localrepo/localrepo.lua", { ignore = { "missing" } })
-- Add local repositories (might be missing if not in use)
script_path = "file://" .. root_dir .. "usr/share/updater/localrepo/localrepo.lua"
if stat(script_path) == "f" then
Script("localrepo", script_path)
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment