From c8d1d5f19f79f11010eb5f758778c6a08ef2ef13 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Mon, 23 Sep 2024 14:09:44 +0100 Subject: [PATCH] copy-firmware.sh: rename variables in symlink hanlding Currently we use f(ile) and d(irectory), over the more common ones t(arget) and l(ink). Rename things appropriately. Signed-off-by: Emil Velikov Link: https://lore.kernel.org/r/20240923-misc-fixes-v2-16-397f23443628@gmail.com Signed-off-by: Mario Limonciello --- copy-firmware.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/copy-firmware.sh b/copy-firmware.sh index 57d43cd0..e2d2945c 100755 --- a/copy-firmware.sh +++ b/copy-firmware.sh @@ -81,16 +81,16 @@ grep -E '^(RawFile|File):' WHENCE | sed -E -e 's/^(RawFile|File): */\1 /;s/"//g' done # shellcheck disable=SC2162 # file/folder name can include escaped symbols -grep -E '^Link:' WHENCE | sed -e 's/^Link: *//g;s/-> //g' | while read f d; do - directory="$destdir/$(dirname "$f")" +grep -E '^Link:' WHENCE | sed -e 's/^Link: *//g;s/-> //g' | while read l t; do + directory="$destdir/$(dirname "$l")" install -d "$directory" - target="$(cd "$directory" && realpath -m -s "$d")" + target="$(cd "$directory" && realpath -m -s "$t")" if test -e "$target"; then - $verbose "creating link $f -> $d" - ln -s "$d" "$destdir/$f" + $verbose "creating link $l -> $t" + ln -s "$t" "$destdir/$l" else - $verbose "creating link $f$compext -> $d$compext" - ln -s "$d$compext" "$destdir/$f$compext" + $verbose "creating link $l$compext -> $t$compext" + ln -s "$t$compext" "$destdir/$l$compext" fi done