Added grub_updater and better .gitignore
This commit is contained in:
13
grub_updater/PKGBUILD
Normal file
13
grub_updater/PKGBUILD
Normal file
@@ -0,0 +1,13 @@
|
||||
pkgname=grub-updater
|
||||
pkgver=1.0.0
|
||||
pkgrel=1
|
||||
pkgdesc="Update grub via pacman-hook."
|
||||
arch=('any')
|
||||
source=(grub-updater.hook grub-updater.sh)
|
||||
sha256sums=('44bb9be24053a54d9ad13eaf2fb3bbf5a82b1b4197cf1d3946607359e00221bf' '85a4f1f23e4e1bc4716e64a60d5f16c29aee61043dbb8c15bec63ef95407c10a')
|
||||
license=('Apache')
|
||||
|
||||
package() {
|
||||
install -Dm0644 -t "$pkgdir/usr/share/libalpm/hooks/" ${source[0]}
|
||||
install -Dm0744 -t "$pkgdir/etc/" ${source[1]}
|
||||
}
|
||||
13
grub_updater/grub-updater.hook
Normal file
13
grub_updater/grub-updater.hook
Normal file
@@ -0,0 +1,13 @@
|
||||
[Trigger]
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Type = Package
|
||||
Target = linux
|
||||
Target = linux-lts
|
||||
Target = linux-zen
|
||||
Target = linux-hardened
|
||||
Target = grub
|
||||
[Action]
|
||||
Description = Reconfiguring grub.
|
||||
When = PostTransaction
|
||||
Exec = /bin/sh /etc/grub-updater.sh
|
||||
9
grub_updater/grub-updater.sh
Executable file
9
grub_updater/grub-updater.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Updating grub config."
|
||||
grub-mkconfig -o /boot/grub/grub.cfg
|
||||
|
||||
echo "Reinstalling grub."
|
||||
grub-install --removable
|
||||
#grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB
|
||||
#grub-install --target=i386-pc /dev/sdX
|
||||
1
grub_updater/src/grub-updater.hook
Symbolic link
1
grub_updater/src/grub-updater.hook
Symbolic link
@@ -0,0 +1 @@
|
||||
/home/yenon/archbuild/grub_updater/grub-updater.hook
|
||||
1
grub_updater/src/grub-updater.sh
Symbolic link
1
grub_updater/src/grub-updater.sh
Symbolic link
@@ -0,0 +1 @@
|
||||
/home/yenon/archbuild/grub_updater/grub-updater.sh
|
||||
Reference in New Issue
Block a user