Explorar o código

kbuild: fix gen_initramfs_list.sh

Create correct dependencies when specifying your own file with
list of files etc. to include in initramfs.
Reported by: Andre Noll <maan@skl-net.de>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Sam Ravnborg %!s(int64=19) %!d(string=hai) anos
pai
achega
46ed981d5d
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      scripts/gen_initramfs_list.sh

+ 5 - 1
scripts/gen_initramfs_list.sh

@@ -200,7 +200,11 @@ input_file() {
 			print_mtime "$1" >> ${output}
 			print_mtime "$1" >> ${output}
 			cat "$1"         >> ${output}
 			cat "$1"         >> ${output}
 		else
 		else
-			grep ^file "$1" | cut -d ' ' -f 3
+			cat "$1" | while read type dir file perm ; do
+				if [ "$type" == "file" ]; then
+					echo "$file \\";
+				fi
+			done
 		fi
 		fi
 	elif [ -d "$1" ]; then
 	elif [ -d "$1" ]; then
 		dir_filelist "$1"
 		dir_filelist "$1"