23 lines
1.1 KiB
Bash
Executable File
23 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# archypr:summary=Ensure the Omarchy and Arch keyring packages are installed and populated
|
|
# archypr:requires-sudo=true
|
|
|
|
if archypr-pkg-missing archypr-keyring || ! sudo pacman-key --list-keys 40DFB630FF42BCFFB047046CF0134EE680CAC571 &>/dev/null; then
|
|
sudo pacman-key --recv-keys 40DFB630FF42BCFFB047046CF0134EE680CAC571 --keyserver keys.openpgp.org
|
|
sudo pacman-key --lsign-key 40DFB630FF42BCFFB047046CF0134EE680CAC571
|
|
|
|
# This is generally not a good idea, but this is a special case because we're going to be updating
|
|
# the full set of packages in archypr-update-system-pkgs right after this (and it needs latest keyring)!
|
|
sudo pacman -Sy
|
|
archypr-pkg-add archypr-keyring
|
|
|
|
sudo pacman-key --list-keys 40DFB630FF42BCFFB047046CF0134EE680CAC571
|
|
fi
|
|
|
|
# Ensure we have the latest archlinux-keyring, maintainer keys might have changed
|
|
# Always reinstall, as the keyring can be updated without a package version bump.
|
|
echo -e "\e[32m\nUpdate Arch signing keys\e[0m"
|
|
sudo pacman -Sy --noconfirm archlinux-keyring >/dev/null 2> >(grep -vE '^warning: archlinux-keyring-[^ ]+ is up to date -- reinstalling$' >&2)
|
|
echo "Keys are correct"
|