Skip to content

Commit 590abbd

Browse files
author
Michal Marek
committed
initramfs: Escape colons in depfile
Special characters are problematic in depfiles, but we can fix colons easily. Reported-by: Florian Fainelli <[email protected]> Signed-off-by: Michal Marek <[email protected]>
1 parent f29ca38 commit 590abbd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/gen_initramfs_list.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ print_mtime() {
9797
}
9898

9999
list_parse() {
100-
[ ! -L "$1" ] && echo "$1 \\" || :
100+
if [ -L "$1" ]; then
101+
return
102+
fi
103+
echo "$1" | sed 's/:/\\:/g; s/$/ \\/'
101104
}
102105

103106
# for each file print a line in following format

0 commit comments

Comments
 (0)