summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorrunnytu2015-06-08 22:02:55 +0200
committerrunnytu2015-06-08 22:02:55 +0200
commit29ecf9e9965cf508ed512dfb71ca98da0c7663ed (patch)
tree7ed9a36a7a1ce378dab44744966162c55815ac34
downloadaur-29ecf9e9965cf508ed512dfb71ca98da0c7663ed.tar.gz
Initial import
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD18
-rwxr-xr-xgrub19
-rw-r--r--grub-hook.install3
4 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..93c41f45ce90
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+# Generated by makepkg 4.2.1
+# Mon Jun 8 20:02:30 UTC 2015
+pkgbase = grub-hook
+ pkgdesc = Pacman hook to update GRUB after a kernel update
+ pkgver = 1.0
+ pkgrel = 1
+ url = https://wiki.archlinux.org/index.php/User:Allan/Pacman_Hooks
+ install = grub-hook.install
+ arch = any
+ license = GPL
+ depends = grub
+ source = grub
+ md5sums = 09a78aa2ecc1e3f5889aff1765453adb
+
+pkgname = grub-hook
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..212a66dde542
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,18 @@
+# Maintainer: Runnytu < runnytu at gmail.com >
+
+pkgname=grub-hook
+pkgver=1.0
+pkgrel=1
+pkgdesc="Pacman hook to update GRUB after a kernel update"
+arch=('any')
+url="https://wiki.archlinux.org/index.php/User:Allan/Pacman_Hooks"
+license=('GPL')
+depends=('grub')
+install=${pkgname}.install
+source=("grub")
+md5sums=('09a78aa2ecc1e3f5889aff1765453adb')
+
+package() {
+ install -m755 -d "${pkgdir}/usr/lib/initcpio/install"
+ install -m644 "${srcdir}/grub" "${pkgdir}/usr/lib/initcpio/install/grub"
+}
diff --git a/grub b/grub
new file mode 100755
index 000000000000..1c9e5574f890
--- /dev/null
+++ b/grub
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+build() {
+ echo "Updating GRUB..."
+ file="/tmp/updategrub.lock"
+ if [ -e $file ]; then
+ rm /tmp/updategrub.lock
+ echo "GRUB already updated. Nothing to be done."
+ else
+ touch /tmp/updategrub.lock
+ grub-mkconfig -o /boot/grub/grub.cfg
+ fi
+}
+
+help() {
+ cat <<HELPEOF
+ Update GRUB after a kernel update
+HELPEOF
+}
diff --git a/grub-hook.install b/grub-hook.install
new file mode 100644
index 000000000000..3c3934f99160
--- /dev/null
+++ b/grub-hook.install
@@ -0,0 +1,3 @@
+post_install() {
+ echo "Please add 'grub' to the HOOKs array in /etc/mkinitcpio.conf (last position)."
+}