summaryrefslogtreecommitdiff
path: root/devel/desktop-file-utils/files/desktop-file-utils.ucl.in
blob: e91868b6531c6e2fc9b2bcc7f617b769bba758f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
}