ports/devel/desktop-file-utils/files/desktop-file-utils.ucl.in
Baptiste Daroussin e188d9a6f5 devel/desktop-file-utils: fix typo
Reported by:	tijl
2021-11-17 11:33:41 +01:00

24 lines
459 B
Text

path: "%%PREFIX%%/%%MIMEDIRS%%"
cleanup: {
type: lua
script: <<EOS
local mimedir = "%%PREFIX%%/%%MIMEDIRS%%/"
local cache = mimedir .. "mimeinfo.cache"
local st = pkg.stat(cache)
if st then
os.remove(cache)
end
local res = pkg.readdir(mimedir)
if #res == 0 then
os.remove(mimedir)
end
EOS
}
trigger: {
type: lua
sandbox: false
script: <<EOS
print("Building cache database of MIME types")
pkg.exec({"%%PREFIX%%/bin/update-desktop-database","-q"})
EOS
}