| Server IP : 82.208.35.60 / Your IP : 216.73.216.89 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/graphics/gtk-update-icon-cache/files/ |
Upload File : |
path_glob: "*/share/icons/*"
trigger: {
type: lua
sandbox: false
script: <<EOS
-- make sure we only get the path one level after share/icons
-- Ensure each path is uniq
local hash = {}
for _,path in ipairs(arg) do
path = string.match(path, ".*share/icons/[^/]*")
if (not hash[path]) and pkg.stat(path) then
local res = pkg.readdir(path)
if #res == 1 and res[1] == "icon-theme.cache" then
os.remove(path .. "/" .. res[1])
os.remove(path)
-- remove share icons if empty
local share_icons = path:gsub("(.*share/icons)/.*", "%1")
local res = pkg.readdir(share_icons)
if #res == 0 then
os.remove(share_icons)
end
else
print("Generating GTK icon cache for " .. path)
pkg.exec({"%%PREFIX%%/bin/gtk-update-icon-cache", "-q", "-t", "-f", path})
end
hash[path] = true
end
end
EOS
}