diff options
author | Hugo Osvaldo Barrera | 2017-05-24 17:00:34 -0300 |
---|---|---|
committer | Hugo Osvaldo Barrera | 2017-05-24 17:00:34 -0300 |
commit | fdb16776c3713aa05ac6988c232f50470fcf3aef (patch) | |
tree | dae96c4e7c1b3c0099b455433144407023fa52aa | |
parent | bd0f9ebae67f060ce9191efc2ddeb9134125b436 (diff) | |
download | aur-fdb16776c3713aa05ac6988c232f50470fcf3aef.tar.gz |
Copy install file from bcwc-pcie-dkms
-rw-r--r-- | bcwc-pcie-git.install | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/bcwc-pcie-git.install b/bcwc-pcie-git.install index 576b48ea72b5..9b9fdb1bbe5a 100644 --- a/bcwc-pcie-git.install +++ b/bcwc-pcie-git.install @@ -1,8 +1,29 @@ post_install() { - KERNEL_VERSION=$(uname -r | cut -d '.' -f 1,2) - depmod $(cat /usr/lib/modules/extramodules-${KERNEL_VERSION}-ARCH/version) + dkms_install $1 +} + +pre_upgrade() { + dkms_remove $2 } post_upgrade() { - post_install + dkms_install $1 +} + +pre_remove () { + dkms_remove $1 +} + +dkms_remove() { + local line=`dkms status -m bcwc-pcie` + if echo "$line" | grep -E 'added|built|installed'; then + dkms remove -m bcwc-pcie -v ${1%%-*} --all + fi +} + +dkms_install() { + dkms install -m bcwc-pcie -v ${1%%-*} + modprobe facetimehd + + /usr/bin/depmod -a } |