scripts: avoid outputting empty lines in gen-dependencies.sh
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 29 Jan 2015 22:05:31 +0000 (22:05 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 29 Jan 2015 22:05:31 +0000 (22:05 +0000)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 44208

scripts/gen-dependencies.sh

index 567fe151a03f5920ea43412a217d523aced62cb4..c6b6f75f55dcd80a813ae0afd3be63a4cb88ad98 100755 (executable)
@@ -28,6 +28,6 @@ tmp=`mktemp $TMP_DIR/dep.XXXXXXXX`
 for kmod in `find $TARGETS -type f -name \*.ko`; do
        $OBJCOPY -O binary -j .modinfo $kmod $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
 rm -f $tmp