Jiri Slaby
a14c1f2f97
OBS-URL: https://build.opensuse.org/package/show/Kernel:stable/kernel-source?expand=0&rev=1570
29 lines
608 B
Bash
29 lines
608 B
Bash
#!/bin/sh -e
|
|
|
|
KREL=$1
|
|
|
|
{ cat /lib/modules/$KREL/modules.dep ;
|
|
cat /lib/modules/$KREL/modules.softdep | grep : | sed -e 's/^softdep //' -e 's/ \(pre\|post\):/:/' ; } \
|
|
| \
|
|
while read l ; do
|
|
MOD=$(echo "$l" | sed -e 's/:.*//')
|
|
MOD=$(basename $MOD)
|
|
case $MOD in
|
|
*.ko.xz|*.ko.gz|*.ko.zst)
|
|
MOD=${MOD%.*};;
|
|
esac
|
|
MOD=${MOD%.ko}
|
|
DEPS="$(echo "$l" | sed -e 's/.*://')"
|
|
moddeps=""
|
|
for dep in $DEPS ; do
|
|
dep=$(basename $dep)
|
|
case $dep in
|
|
*.ko.xz|*.ko.gz|*.ko.zst)
|
|
dep=${dep%.*};;
|
|
esac
|
|
dep=${dep%.ko}
|
|
moddeps="$moddeps $dep"
|
|
done
|
|
[ -n "$moddeps" ] && echo $MOD:$moddeps ||:
|
|
done
|