linux-libre-vanilla-armv7h.install 791 B

12345678910111213141516171819202122232425262728293031
  1. # armv7h mkinitcpio and install hooks do not manage the /boot dir properly (BR #3520)
  2. _pkgbase=linux-libre-vanilla
  3. _variant=${_pkgbase#linux-libre}
  4. _kernel_dest=boot/vmlinuz-${_pkgbase}
  5. _install()
  6. {
  7. local pkgver=${1%-*}
  8. local kver=${pkgver}-gnu-[0-9]${_variant}
  9. [[ ! -f "${_kernel_dest}" ]] || ! echo "nothing to do" || return 0
  10. # mv ${kver} 2> /dev/null ${_kernel_dest} ||
  11. mv ${kver} ${_kernel_dest} ||
  12. cp usr/lib/modules/${kver}/vmlinuz ${_kernel_dest}
  13. }
  14. post_install() { _install $1 ; }
  15. post_upgrade() { _install $1 ; }
  16. post_remove()
  17. {
  18. [[ -f boot/initramfs-${_pkgbase}.img ]] ||
  19. [[ -f boot/vmlinuz-${_pkgbase} ]] || ! echo "nothing to do" || return 0
  20. rm -f boot/initramfs-${_pkgbase}.img
  21. rm -f boot/vmlinuz-${_pkgbase}
  22. }