1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/bin/sh KERNEL_VER= for kver in $(dpkg-query -W -f '${Package}\n' 'linux-headers-*' | sed s/linux-headers-//) do if [ -d "/lib/modules/$kver/build" ] then KERNEL_VER=$kver break fi done export KERNEL_VER bash ./run_test.sh