forked from ublue-os/akmods
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-kmod-openrazer.sh
executable file
·24 lines (19 loc) · 1.14 KB
/
build-kmod-openrazer.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
set -oeux pipefail
ARCH="$(rpm -E '%_arch')"
KERNEL="$(rpm -q "${KERNEL_NAME}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')"
RELEASE="$(rpm -E '%fedora')"
cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/
### BUILD openrazer (succeed or fail-fast with debug output)
rpm-ostree install \
akmod-openrazer-*.fc${RELEASE}.${ARCH}
akmods --force --kernels "${KERNEL}" --kmod openrazer
modinfo /usr/lib/modules/${KERNEL}/extra/openrazer/razerkbd.ko.xz > /dev/null \
|| (find /var/cache/akmods/openrazer/ -name \*.log -print -exec cat {} \; && exit 1)
modinfo /usr/lib/modules/${KERNEL}/extra/openrazer/razermouse.ko.xz > /dev/null \
|| (find /var/cache/akmods/openrazer/ -name \*.log -print -exec cat {} \; && exit 1)
modinfo /usr/lib/modules/${KERNEL}/extra/openrazer/razerkraken.ko.xz > /dev/null \
|| (find /var/cache/akmods/openrazer/ -name \*.log -print -exec cat {} \; && exit 1)
modinfo /usr/lib/modules/${KERNEL}/extra/openrazer/razeraccessory.ko.xz > /dev/null \
|| (find /var/cache/akmods/openrazer/ -name \*.log -print -exec cat {} \; && exit 1)
rm -f /etc/yum.repos.d/_copr_ublue-os-akmods.repo