Commit b5a5e4c73228e1c5f646ee2524f5e13ae5f08b4d

Authored by Felix Fietkau
Committed by Sam Ravnborg
1 parent 01dee1881d

kbuild: fix unportability in gen_initramfs_list.sh

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

scripts/gen_initramfs_list.sh
... ... @@ -135,7 +135,7 @@
135 135 str="${ftype} ${name} ${str} ${dev} ${maj} ${min}"
136 136 ;;
137 137 "slink")
138   - local target=`field 11 $(LC_ALL=C ls -l "${location}")`
  138 + local target=`readlink "${location}"`
139 139 str="${ftype} ${name} ${target} ${str}"
140 140 ;;
141 141 *)