depmod: fix handling of .gz modules

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2009-05-18 13:08:04 +02:00
parent c396fe6306
commit 16bda3bd1f
3 changed files with 47 additions and 14 deletions

20
modutils/depmod_process.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/sh
# Depmod output may be hard to diff.
# This script sorts dependencies within "xx.ko: yy.ko zz.ko" lines,
# and sorts all lines too.
# Usage:
#
# [./busybox] depmod -n | ./depmod_process.sh | sort >OUTFILE
#
# and then you can diff OUTFILEs. Useful for comparing bbox depmod
# with module-init-tools depmod and such.
while read -r word rest; do
if ! test "${word/*:/}"; then
echo -n "$word "
echo "$rest" | xargs -n1 | sort | xargs
else
echo "$word $rest";
fi
done