diff options
Diffstat (limited to 'hid-sony.install')
-rw-r--r-- | hid-sony.install | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/hid-sony.install b/hid-sony.install new file mode 100644 index 000000000000..9b412c79866f --- /dev/null +++ b/hid-sony.install @@ -0,0 +1,21 @@ +post_install() { + echo ">>> DKMS: Module add, build, and install" + dkms install -m hid-sony -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=$(LANG=C pacman -Qi dkms-hid-sony-shanwan | awk '/^Version/{print $3}') + pre_remove $curver +} + +pre_remove() { + echo ">>> DKMS: Module uninstall" + dkms remove -m hid-sony -v ${1%%-*} --all +} + +post_upgrade() { + post_install ${1%%-*} +} |