summaryrefslogtreecommitdiff
path: root/security/archlinux-keyring/files/archlinux-keyring.ucl.in
blob: ce622abb06c549ba552b03ff815ef96cd2729a47 (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
25
26
27
28
29
path_glob: %%LOCALBASE%%/share/pacman/keyrings
cleanup: {
	type: lua
	sandbox: false
	script: <<EOS
function cleanup(directory)
  for _,d in ipairs(pkg.readdir(directory)) do
    local full_path = directory .. "/" .. d
    local stat = pkg.stat(full_path)
    if stat["type"] == "dir" then
      cleanup(full_path)
    end
    os.remove(full_path)
  end
  os.remove(directory)
end

cleanup("%%LOCALBASE%%/etc/pacman.d/gnupg")
EOS
}
trigger: {
	type: lua
	sandbox: false
	script: <<EOS
pkg.exec({"pacman-key", "--init"})
pkg.exec({"pacman-key", "--populate", "archlinux"})
pkg.exec({"pacman-key", "--updatedb"})
EOS
}