From 7581fc433f93bc7686fcea3f8f169c5994c0dcdd Mon Sep 17 00:00:00 2001 From: dr460nf1r3 Date: Sat, 26 Jun 2021 20:00:10 +0200 Subject: [PATCH] Add update script which checks for keyring updates before updating --- PKGBUILD | 2 +- usr/bin/update | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100755 usr/bin/update diff --git a/PKGBUILD b/PKGBUILD index 397c465..756b00f 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,7 +2,7 @@ # Maintainer: Librewish pkgname=garuda-common-settings -pkgver=1.2.9 +pkgver=1.3.0 pkgrel=1 arch=('any') url="https://gitlab.com/garuda-linux/themes-and-settings/settings/$pkgname" diff --git a/usr/bin/update b/usr/bin/update new file mode 100755 index 0000000..57f5e96 --- /dev/null +++ b/usr/bin/update @@ -0,0 +1,16 @@ +#!/bin/bash +# Refresh mirrorlist +sudo reflector --latest 5 --age 2 --fastest 5 --protocol https --sort rate --save /etc/pacman.d/mirrorlist && cat /etc/pacman.d/mirrorlist + +# Check for keyring update & update as needed +if "/usr/bin/checkupdates" | grep chaotic-keyring; then + sudo pacman -Sy chaotic-keyring && sudo pacman -Su +elif "/usr/bin/checkupdates" | grep archlinux-keyring; then + sudo pacman -Sy archlinux-keyring && sudo pacman -Su +else sudo pacman -Syu + +# Update fish autocompletions +fish_update_completions + +# Update mlocate index +sudo updatedb