7b79ae
#!/bin/sh
7b79ae
#
7b79ae
# firmware.prov - Automatically extract any and all firmware dependencies from
7b79ae
#                 kernel object (.ko) files and add to RPM deps.
7b79ae
7b79ae
IFS=$'\n'
7b79ae
7b79ae
for module in $(grep -E '/lib/modules/.+\.ko(\.gz|\.bz2|\.xz)?$') $*;
7b79ae
do
7b79ae
    for firmware in `/sbin/modinfo -F firmware $module`;
7b79ae
    do
7b79ae
        echo "firmware($firmware)"
7b79ae
    done
7b79ae
done