mirror of
https://gitlab.com/kernel-firmware/linux-firmware.git
synced 2025-12-10 07:44:48 +01:00
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 <emil.l.velikov@gmail.com>
This commit is contained in:
parent
9ce7dac098
commit
a89349c33c
1 changed files with 7 additions and 7 deletions
|
|
@ -81,16 +81,16 @@ grep -E '^(RawFile|File):' WHENCE | sed -E -e 's/^(RawFile|File): */\1 /;s/"//g'
|
||||||
done
|
done
|
||||||
|
|
||||||
# shellcheck disable=SC2162 # file/folder name can include escaped symbols
|
# 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
|
grep -E '^Link:' WHENCE | sed -e 's/^Link: *//g;s/-> //g' | while read l t; do
|
||||||
directory="$destdir/$(dirname "$f")"
|
directory="$destdir/$(dirname "$l")"
|
||||||
install -d "$directory"
|
install -d "$directory"
|
||||||
target="$(cd "$directory" && realpath -m -s "$d")"
|
target="$(cd "$directory" && realpath -m -s "$t")"
|
||||||
if test -e "$target"; then
|
if test -e "$target"; then
|
||||||
$verbose "creating link $f -> $d"
|
$verbose "creating link $l -> $t"
|
||||||
ln -s "$d" "$destdir/$f"
|
ln -s "$t" "$destdir/$l"
|
||||||
else
|
else
|
||||||
$verbose "creating link $f$compext -> $d$compext"
|
$verbose "creating link $l$compext -> $t$compext"
|
||||||
ln -s "$d$compext" "$destdir/$f$compext"
|
ln -s "$t$compext" "$destdir/$l$compext"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue