summarylogtreecommitdiffstats
path: root/bbswitch-dkms-git.install
blob: 2748873ba54f9147f33607da03677cae3c4fdea6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
PKGVER="$(ls /usr/src/ | grep bbswitch | sed 's/^.*-//')"
_dkms="/usr/bin/dkms"


post_install() {
  ${_dkms} add -m "bbswitch/${PKGVER}"
  ${_dkms} build -m "bbswitch/${PKGVER}"
  ${_dkms} install -m "bbswitch/${PKGVER}"
}

post_upgrade() {
  post_install
}

pre_remove() {
  ${_dkms} remove -m "bbswitch/${PKGVER}" --all
}

pre_upgrade() {
  pre_remove
}

post_remove() {
  depmod -a
}