summaryrefslogtreecommitdiff
path: root/community/catalyst-dkms/catalyst.install
diff options
context:
space:
mode:
Diffstat (limited to 'community/catalyst-dkms/catalyst.install')
-rw-r--r--community/catalyst-dkms/catalyst.install24
1 files changed, 9 insertions, 15 deletions
diff --git a/community/catalyst-dkms/catalyst.install b/community/catalyst-dkms/catalyst.install
index f32e7ae7a..655468646 100644
--- a/community/catalyst-dkms/catalyst.install
+++ b/community/catalyst-dkms/catalyst.install
@@ -1,24 +1,18 @@
-post_install()
-{
- dkms add -m fglrx -v $1
- dkms build -m fglrx -v $1
+post_install() {
dkms install -m fglrx -v $1
}
-pre_upgrade()
-{
- dkms remove -m fglrx -v $1 --all
+pre_upgrade() {
+ local curver=$2
+ # $2 is unset due to a bug. Query current version using pacman as fallback
+ [ -n "$curver" ] || curver=$(pacman -Qi catalyst-dkms | awk '/^Version/{print $3}')
+ pre_remove $curver
}
-post_upgrade()
-{
- dkms add -m fglrx -v $1
- dkms build -m fglrx -v $1
- dkms install -m fglrx -v $1
+post_upgrade() {
+ post_install $1
}
-pre_remove()
-{
+pre_remove() {
dkms remove -m fglrx -v $1 --all
}
-