summarylogtreecommitdiffstats
path: root/grub-git.install
diff options
context:
space:
mode:
authorLlewelyn Trahaearn2019-01-20 22:26:54 -0800
committerLlewelyn Trahaearn2019-01-20 22:26:54 -0800
commit6fcc288e5fd3027df42b31669620bf481683a6c3 (patch)
treefe5cb143ba8add16fa6a5c6ba626de87fc0bf32d /grub-git.install
parent94d9003d6882600828b6eb63fe5f5908b1e3fdc7 (diff)
downloadaur-6fcc288e5fd3027df42b31669620bf481683a6c3.tar.gz
Major rewrite of build() and package() for increased readability and easier maintenance of the PKGBUILD.
Diffstat (limited to 'grub-git.install')
-rw-r--r--grub-git.install20
1 files changed, 11 insertions, 9 deletions
diff --git a/grub-git.install b/grub-git.install
index cf2e4b59535f..c13ef99c77c5 100644
--- a/grub-git.install
+++ b/grub-git.install
@@ -1,15 +1,17 @@
-post_install() {
- if [ -f /boot/grub/grub.cfg.pacsave ]; then
- echo "Copying /boot/grub/grub.cfg.pacsave to /boot/grub/grub.cfg"
- install -D -m0644 /boot/grub/grub.cfg.pacsave /boot/grub/grub.cfg
+#!/bin/sh
+
+post_upgrade() {
+ # We used to package /boot/grub/grub.cfg, but there is no reason to.
+ # Remove the file from package, but move real file back in place.
+ if [ ! -f /boot/grub/grub.cfg -a -f /boot/grub/grub.cfg.pacsave ]; then
+ mv /boot/grub/grub.cfg.pacsave /boot/grub/grub.cfg
fi
+}
+post_install() {
cat << 'EOM'
-Generating grub.cfg.example config file...
-This may fail on some machines running a custom kernel.
+Generate your bootloader configuration with:
+ grub-mkconfig -o /boot/grub/grub.cfg
EOM
-
- grub-mkconfig -o /boot/grub/grub.cfg.example 2> /dev/null
- echo "done."
}