From 552a359c4599f441315adfa21d91f2fd3d892dd7 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sun, 18 Apr 2010 13:32:16 +0000 Subject: [PATCH] add install-info presence test to install script --- PKGBUILD | 5 +---- grub.install | 20 +++++++++----------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 18f2f10..f41e6dd 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,7 +2,7 @@ pkgname=grub pkgver=0.97 -pkgrel=16 +pkgrel=17 pkgdesc="A GNU multiboot boot loader" arch=('i686' 'x86_64') license=('GPL') @@ -74,9 +74,6 @@ build() { make DESTDIR=$pkgdir install || return 1 install -D -m644 ../menu.lst $startdir/pkg/boot/grub/menu.lst install -D -m755 ../install-grub $startdir/pkg/sbin/install-grub - - rm -f $pkgdir/usr/share/info/dir || return 1 - gzip /$pkgdir/usr/share/info/* if [ "$DESTARCH" = "x86_64" ]; then # fool makepkg into building a x86_64 package diff --git a/grub.install b/grub.install index bf52382..c1f077d 100644 --- a/grub.install +++ b/grub.install @@ -1,22 +1,20 @@ -info_dir=/usr/share/info -info_files=(grub.info multiboot.info) +infodir=/usr/share/info +filelist=(grub.info multiboot.info) post_install() { - for f in ${info_files[@]}; do - install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null done } post_upgrade() { - post_install + post_install $1 } pre_remove() { - for f in ${info_files[@]}; do - install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null done } - - - -