scripts: avoid outputting empty lines in gen-dependencies.sh

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44208
This commit is contained in:
Jo-Philipp Wich 2015-01-29 22:05:31 +00:00
parent c3787d4c0c
commit a06f81cc3b

View file

@ -28,6 +28,6 @@ tmp=`mktemp $TMP_DIR/dep.XXXXXXXX`
for kmod in `find $TARGETS -type f -name \*.ko`; do for kmod in `find $TARGETS -type f -name \*.ko`; do
$OBJCOPY -O binary -j .modinfo $kmod $tmp $OBJCOPY -O binary -j .modinfo $kmod $tmp
sed -e 's,\x00,\n,g' $tmp | \ sed -e 's,\x00,\n,g' $tmp | \
sed -ne '/^depends=.\+/ { s/^depends=//; s/\(,\|$\)/.ko\n/gp; q }' sed -ne '/^depends=.\+/ { s/^depends=//; s/,/.ko\n/g; s/$/.ko/p; q }'
done | sort -u done | sort -u
rm -f $tmp rm -f $tmp