a7aa4306f6
OBS-URL: https://build.opensuse.org/package/show/Kernel:slowroll/kernel-source-longterm?expand=0&rev=56
22 lines
404 B
Bash
22 lines
404 B
Bash
#!/bin/sh
|
|
|
|
dependencies=$1
|
|
modules=$2
|
|
result=$3
|
|
|
|
cat $modules | tr ' ' '\n' > $result
|
|
echo > $result~
|
|
|
|
while ! diff -q $result~ $result > /dev/null ; do
|
|
cp $result $result~
|
|
while read MOD ; do
|
|
moddeps="$(grep ^$MOD: $dependencies | sed -e 's/.*://' ||:)"
|
|
for DEP in $moddeps ; do
|
|
if ! grep -q ^$DEP\$ $result ; then
|
|
echo $DEP >> $result
|
|
echo $MOD: $DEP
|
|
fi
|
|
done
|
|
done < $result
|
|
done
|