Add update script which checks for keyring updates before updating
This commit is contained in:
parent
00c7fcf3c7
commit
7581fc433f
2 changed files with 17 additions and 1 deletions
2
PKGBUILD
2
PKGBUILD
|
@ -2,7 +2,7 @@
|
|||
# Maintainer: Librewish <librewish@gmail.com>
|
||||
|
||||
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"
|
||||
|
|
16
usr/bin/update
Executable file
16
usr/bin/update
Executable file
|
@ -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
|
Loading…
Reference in a new issue