You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
archzfs/packages/dkms/spl-dkms-git/spl-dkms-alpm-hook

28 lines
582 B

#!/bin/bash
# display what to run and run it quietly
run() {
echo "==> $*"
"$@" > /dev/null
}
# compile spl for the given kernel
install_spl() {
local kernel="${1}"
for m in $(ls /usr/src); do
if [[ "${m}" =~ ^spl-(.*)$ ]]; then
run dkms install "spl/${BASH_REMATCH[1]}" -k "${kernel}"
fi
done
}
# go through all kernels and run install_spl()
main() {
for kernel in $(ls /usr/lib/modules); do
if [[ -d "/usr/lib/modules/${kernel}/kernel" ]]; then
install_spl "${kernel}"
fi
done
}
main