kbuild: fix unportability in gen_initramfs_list.sh
authorFelix Fietkau <nbd@openwrt.org>
Wed, 2 Apr 2008 12:50:05 +0000 (14:50 +0200)
committerSam Ravnborg <sam@uranus.ravnborg.org>
Mon, 28 Apr 2008 20:50:51 +0000 (22:50 +0200)
On a Mac OS X machine the output of ls -l is different from a standard
Linux machine. Use readlink instead of parsing a hardcoded field number
from the ls output.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
scripts/gen_initramfs_list.sh

index 684fb9cdc055cc15d1ac3f39cdbd9fa47a245104..5f3415f28736a386d84b77ae4fa9e2f179958221 100644 (file)
@@ -135,7 +135,7 @@ parse() {
                        str="${ftype} ${name} ${str} ${dev} ${maj} ${min}"
                        ;;
                "slink")
-                       local target=`field 11 $(LC_ALL=C ls -l "${location}")`
+                       local target=`readlink "${location}"`
                        str="${ftype} ${name} ${target} ${str}"
                        ;;
                *)
This page took 0.02653 seconds and 5 git commands to generate.