summarylogtreecommitdiffstats
path: root/hid-retrobit-dkms.install
blob: 9179b051362f3bcc04db7b184cc5091dacf77e72 (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
26
PKGVER="$(ls /usr/src/ | grep hid-retrobit | sed 's/^.*-//')"
_dkms="/usr/bin/dkms"

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

  echo "Please add hid-retrobit to modules-load.d or equivalent in order to use the driver"
}

post_upgrade() {
  post_install
}

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

pre_upgrade() {
  pre_remove
}

post_remove() {
  depmod -a
}