#!/bin/bash

# load_kmods_in_dir
# Load all modules into the Kernel within the PWD.
#
# Example usage:
# $ cd /lib/modules/$(uname -r)/kernel/drivers/pci
# Run this script

find . -type f -name '*.ko.*' | while read mod; do modprobe $( basename $mod .ko.xz ) ; done
