zerog

[archived] simple Parabola GNU/Linux post-install script
git clone git://git.hanetzok.net/zerog
Log | Files | Refs | README | LICENSE

commit 97eae1fa4d971bfba5b1f6bdb7f4489605158f1d
parent 04fdf1d87b36307ba820904a87cb18df2eb20ead
Author: Markus Hanetzok <markus@hanetzok.net>
Date:   Mon, 22 Aug 2022 09:46:52 +0200

Replace check with automatic key refresh

Since the chances for at least one of the keys in one of the keyrings
not being recent and checking if key installation went well is a PITA,
zerog will automatically refresh pacman-key and then pacman -Sy the
keyrings. Takes a while but is more stable

Diffstat:
Mzerog | 23++++++-----------------
1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/zerog b/zerog @@ -26,25 +26,14 @@ error() { printf "Error: $1\n" exit 1 } - -install_keys() { - pacman -S --noconfirm --needed archlinux-keyring archlinuxarm-keyring \ - parabola-keyring >/dev/null 2>&1 || - { warning "Could not install keyrings"; return 1; } -} - -refresh_keys() { - pacman-key --refresh >/dev/null 2>&1 || - { warning "Could not refresh keys"; return 1; } -} - prepare() { printf "Preparing...\n" - printf "Installing keys...\n" - install_keys || - { printf "Refreshing keys (This will take a while!)...\n" - refresh_keys; } || { warning "Could not refresh keys"; return 1; } - install_keys || { warning "Could not install keys"; return 1; } + printf "Refreshing keys...\n(This will take a while!)\n" + pacman-key --refresh >/dev/null 2>&1 || + { warning "Could not refresh keys"; return 1; } + pacman -Sy --noconfirm --needed archlinux-keyring archlinuxarm-keyring \ + parabola-keyring >/dev/null 2>&1 || + { warning "Could not install keyrings"; return 1; } pacman -S --noconfirm --needed git zsh ca-certificates >/dev/null 2>&1 || { warning "Initial installs failed"; return 1; }