summarylogtreecommitdiffstats
path: root/tuxedo-wmi-dkms.install
blob: 9cee95462e8a369a9cb52041df0cafd08df4b8b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
post_install() {
  dkms install -m tuxedo-wmi -v ${1%%-*}
}

pre_upgrade() {
  local curver=${2%%-*}
  # $2 is unset due to a bug. See, https://bugs.archlinux.org/task/32278
  # Query current version using pacman as fallback
  [ -n "$curver" ] || curver=$(pacman -Q tuxedo-wmi-dkms | cut -d' ' -f2)
  pre_remove $curver
}

post_upgrade() {
  post_install ${1%%-*}
}

pre_remove() {
  dkms remove -m tuxedo-wmi -v ${1%%-*} --all
}