Commit 2a6cbcde authored by Seblu's avatar Seblu
Browse files

use type instead of which


git-svn-id: https://seblu.net/s/archpkg@239 02741741-5192-46b8-8916-7152b19231d9
parent 0c0f972c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ kernelver=3.3.4
kernelsuf=-seblu
pkgname=linux
pkgver=2
pkgrel=1
pkgrel=2
arch=('x86_64')
license=('GPL2')
url='http://www.kernel.org'
+2 −49
Original line number Diff line number Diff line
@@ -9,13 +9,10 @@ post_install () {
  depmod ${KERNEL_BUILD}
  echo "==> Generationg init root filesystem..."
  mkinitcpio -p $pkgname
  if which grub-mkconfig >/dev/null; then
  if type -P grub-mkconfig >/dev/null; then
    echo "==> Updating grub2 configuration..."
    grub-mkconfig -o /boot/grub/grub.cfg
  fi
  #if test -e /usr/bin/VirtualBox; then
  #  compile_vbox_modules
  #fi
}

pre_upgrade() {
@@ -37,54 +34,10 @@ pre_remove() {
}

post_remove() {
  if which grub-mkconfig >/dev/null; then
  if type -P grub-mkconfig >/dev/null; then
    echo "==> Updating grub2 configuration..."
    grub-mkconfig -o /boot/grub/grub.cfg
  fi
}

#compile_vbox_modules() {
#    echo "==> Compiling VirtualBox modules"
#
#    # Preparing environment
#    export KERN_DIR=/lib/modules/${KERNEL_BUILD}/build
#    export MODULE_DIR=/lib/modules/${KERNEL_BUILD}/misc
#    LOG="/var/log/vbox-install.log"
#    . /etc/vbox/vbox.cfg
#
#    if [ -n "$INSTALL_DIR" ]; then
#      VBOXMANAGE="$INSTALL_DIR/VBoxManage"
#      BUILDVBOXDRV="$INSTALL_DIR/src/vboxhost/vboxdrv/build_in_tmp"
#      BUILDVBOXNETFLT="$INSTALL_DIR/src/vboxhost/vboxnetflt/build_in_tmp"
#      BUILDVBOXNETADP="$INSTALL_DIR/src/vboxhost/vboxnetadp/build_in_tmp"
#    else
#      echo "==> Missing vbox.cfg"
#      return
#    fi
#
#    # building vboxdrv
#    echo "==> Compiling vboxdrv"
#    if ! $BUILDVBOXDRV \
#      --save-module-symvers /tmp/vboxdrv-Module.symvers \
#      --no-print-directory install > $LOG 2>&1; then
#      echo  "Look at $LOG to find out what went wrong"
#    fi
#
#    # building vboxnetflt
#    echo "==> Compiling vboxnetflt"
#    if ! $BUILDVBOXNETFLT \
#      --use-module-symvers /tmp/vboxdrv-Module.symvers \
#      --no-print-directory install >> $LOG 2>&1; then
#      echo "Look at $LOG to find out what went wrong"
#    fi
#
#    # build vboxnetadp
#    echo "==> Compiling vboxnetadp"
#    if ! $BUILDVBOXNETADP \
#      --use-module-symvers /tmp/vboxdrv-Module.symvers \
#      --no-print-directory install >> $LOG 2>&1; then
#      echo "Look at $LOG to find out what went wrong"
#    fi
#}

# vim:set ts=2 sw=2 ft=sh et: