Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

nvidia.install

By: a guest on Oct 23rd, 2012  |  syntax: Bash  |  size: 0.38 KB  |  views: 59  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. post_install() {
  2.         dkms install -m nvidia -v ${1%%-*}
  3. }
  4. pre_upgrade() {
  5.         local curver=${2%%-*}
  6.         # $2 is unset due to a bug. Query current version using pacman as fallback
  7.         [ -n "$curver" ] || curver=$(pacman -Qi dkms-nvidia | awk '/^Version/{print $3}')
  8.         pre_remove $curver
  9. }
  10. post_upgrade() {
  11.         post_install ${1%%-*}
  12. }
  13. pre_remove() {
  14.         dkms remove -m nvidia -v ${1%%-*} --all
  15. }