From c1bef9e01060f157f95496f0cbd4edb7b68a3dc8 Mon Sep 17 00:00:00 2001 From: Tony Nguyen Date: Mon, 28 Sep 2020 17:25:39 -0700 Subject: [PATCH] copy-firmware: Always write Link: entries File: entries in the WHENCE file overwrite existing files in the target directory, however, Link: entries are skipped if the file exists in the target directory. This can cause issues if the Link: entry is updated, but the target directory contains an old symlink. Do not skip writing Link: entries if the file exists, always create the symlink. This matches the behavior of File: entries and ensures symlinks will contain values from the WHENCE file. Signed-off-by: Tony Nguyen Signed-off-by: Josh Boyer --- copy-firmware.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/copy-firmware.sh b/copy-firmware.sh index eda16c3..9b46b63 100755 --- a/copy-firmware.sh +++ b/copy-firmware.sh @@ -62,7 +62,6 @@ grep -E '^Link:' WHENCE | sed -e's/^Link: *//g' -e's/-> //g' | while read f d; d $verbose "WARNING: missing target for symlink $f" fi else - test -f "$destdir/$f" && continue $verbose "creating link $f -> $d" mkdir -p $destdir/$(dirname "$f") ln -sf "$d" "$destdir/$f"