Skip to content

Commit d3b3662

Browse files
committed
Add grub-update-hook
1 parent d6908fa commit d3b3662

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
'cslock-git|N', 'cdmenu-git|N', 'pvs-studio|N', 'knock-git|N', 'hakrawler-git|Y', 'bashmount|Y',
1616
'bashmount-git|Y', 'firefox-sync|Y', 'pdd-git|Y', 'onivim2-nightly-bin|Y', 'python-isr-git|Y',
1717
'repostat-git|Y', 'python-upnpclient|Y', 'imgur.sh|Y', 'vidmerger-bin|Y', 'vidmerger-git|Y',
18-
'paisa-git|Y', 'paisa-bin|Y', 'pdfjumbler|Y', 'pdfjumbler-git|Y', 'passhole-git|N']
18+
'paisa-git|Y', 'paisa-bin|Y', 'pdfjumbler|Y', 'pdfjumbler-git|Y', 'passhole-git|N', 'grub-update-hook|N']
1919
steps:
2020
- name: Set env variables
2121
run: |

grub-update-hook/PKGBUILD

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Maintainer: Santiago Lo Coco <mail at slococo dot com dot ar>
2+
3+
pkgname=grub-update-hook
4+
pkgver=20250517
5+
pkgrel=1
6+
pkgdesc="Pacman hook to update GRUB after a kernel update."
7+
arch=('any')
8+
url='https://wiki.archlinux.org/title/GRUB#Warning_to_perform_grub-install/grub-mkconfig_at_each_grub_update'
9+
license=('GPL')
10+
depends=('grub')
11+
_hookname="${pkgname%-hook}.hook"
12+
source=("${_hookname}")
13+
sha256sums=('4dfddd46ca0c68e1cd7247e98ee75bef91a6946ae3cde514aff86f6edac0cffe')
14+
15+
package() {
16+
install -Dm 755 "${_hookname}" "${pkgdir}/etc/pacman.d/hooks/${_hookname}"
17+
}
18+

grub-update-hook/grub-update.hook

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[Trigger]
2+
Operation = Upgrade
3+
4+
Type = Package
5+
Target = grub
6+
7+
[Action]
8+
Description = Regenerate grub if updated
9+
When = PostTransaction
10+
Depends = grub
11+
Exec = /bin/sh -c "/usr/bin/grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB && /usr/bin/grub-mkconfig -o /boot/grub/grub.cfg"

0 commit comments

Comments
 (0)