瀏覽代碼

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>
Felix Fietkau 17 年之前
父節點
當前提交
b5a5e4c732
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scripts/gen_initramfs_list.sh

+ 1 - 1
scripts/gen_initramfs_list.sh

@@ -135,7 +135,7 @@ parse() {
 			str="${ftype} ${name} ${str} ${dev} ${maj} ${min}"
 			str="${ftype} ${name} ${str} ${dev} ${maj} ${min}"
 			;;
 			;;
 		"slink")
 		"slink")
-			local target=`field 11 $(LC_ALL=C ls -l "${location}")`
+			local target=`readlink "${location}"`
 			str="${ftype} ${name} ${target} ${str}"
 			str="${ftype} ${name} ${target} ${str}"
 			;;
 			;;
 		*)
 		*)