Skip to contentSkip to conversation

fix unportability in gen_initramfs_list.sh

PATCH New Felix Fietkau 1 participant 1 message Apr 2, 2008 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

scripts/gen_initramfs_list.sh +1 -1
index 684fb9c..5f3415f 100644
@@ -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}"
   			;;
   		*)