Changeset View
Changeset View
Standalone View
Standalone View
misc/shared-mime-info/files/shared-mime-info.ucl.in
- This file was added.
path: "%%PREFIX%%/share/mime/packages" | |||||
cleanup: { | |||||
type: lua | |||||
script: <<EOS | |||||
local mimedir = "%%PREFIX%%/share/mime/" | |||||
local files = { "XMLnamespaces", "aliases", "generic-icons", "globs", "globs2", "icons", "mime.cache", "subclasses", "treemagic", "types", "version"} | |||||
for _,filename in pairs(files) do | |||||
local fpath = mimedir .. filename | |||||
local st = pkg.stat(fpath) | |||||
if st then | |||||
os.remove(fpath) | |||||
end | |||||
end | |||||
local res = pkg.readdir(mimedir) | |||||
if #res == 0 then | |||||
os.remove(mimedir) | |||||
end | |||||
EOS | |||||
} | |||||
trigger: { | |||||
type: lua | |||||
sandbox: false | |||||
script: <<EOS | |||||
print("Building the Shared MIME-Info database cache") | |||||
pkg.exec({"%%PREFIX%%/bin/update-mime-database", "%%PREFIX%%/share/mime"}) | |||||
EOS | |||||
} |