summaryrefslogtreecommitdiff
path: root/libre/grub-git/grub.install
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2016-01-20 21:07:15 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2016-01-20 21:12:23 -0300
commit4908ab12e48bd3b9c9676689e9cc074d91e9243f (patch)
tree44b84f6c47e2a86c144b9e6cd9228ac51afaf83a /libre/grub-git/grub.install
parent56e5a39f8f249f5600a230291c0338445371965e (diff)
downloadabslibre-4908ab12e48bd3b9c9676689e9cc074d91e9243f.tar.gz
abslibre-4908ab12e48bd3b9c9676689e9cc074d91e9243f.tar.bz2
abslibre-4908ab12e48bd3b9c9676689e9cc074d91e9243f.zip
add grub-git (uboot only) to [libre]
Diffstat (limited to 'libre/grub-git/grub.install')
-rw-r--r--libre/grub-git/grub.install33
1 files changed, 33 insertions, 0 deletions
diff --git a/libre/grub-git/grub.install b/libre/grub-git/grub.install
new file mode 100644
index 000000000..9188b357a
--- /dev/null
+++ b/libre/grub-git/grub.install
@@ -0,0 +1,33 @@
+infodir="usr/share/info"
+filelist=('grub.info' 'grub-dev.info')
+
+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
+ fi
+
+ cat << 'EOM'
+Generating grub.cfg.example config file...
+This may fail on some machines running a custom kernel.
+EOM
+
+ grub-mkconfig -o /boot/grub/grub.cfg.example 2> /dev/null
+ echo "done."
+
+ for file in ${filelist[@]}; do
+ install-info ${infodir}/${file}.gz ${infodir}/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ for file in ${filelist[@]}; do
+ install-info ${infodir}/${file}.gz ${infodir}/dir 2> /dev/null
+ done
+}
+
+pre_remove() {
+ for file in ${filelist[@]}; do
+ install-info --delete ${infodir}/${file} ${infodir}/dir 2> /dev/null
+ done
+}