mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
synced 2024-12-17 20:55:27 +00:00
copy-firmware: quote deskdir and dirname
Properly quote, otherwise we'll get word splitting. In other words: Files might end up installed to /some/foo/, where /some path/foo bar/ is expected. v2: - rebase/split && also quote the $() output Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Josh Boyer <jwboyer@kernel.org>
This commit is contained in:
parent
77f92e0b9d
commit
40fa2b2096
@ -34,16 +34,16 @@ done
|
||||
grep '^File:' WHENCE | sed -e's/^File: *//g' -e's/"//g' | while read f; do
|
||||
test -f "$f" || continue
|
||||
$verbose "copying file $f"
|
||||
install -d $destdir/$(dirname "$f")
|
||||
cp -d "$f" $destdir/"$f"
|
||||
install -d "$destdir/$(dirname "$f")"
|
||||
cp -d "$f" "$destdir/$f"
|
||||
done
|
||||
|
||||
grep -E '^Link:' WHENCE | sed -e's/^Link: *//g' -e's/-> //g' | while read f d; do
|
||||
if test -L "$f"; then
|
||||
test -f "$destdir/$f" && continue
|
||||
$verbose "copying link $f"
|
||||
install -d $destdir/$(dirname "$f")
|
||||
cp -d "$f" $destdir/"$f"
|
||||
install -d "$destdir/$(dirname "$f")"
|
||||
cp -d "$f" "$destdir/$f"
|
||||
|
||||
if test "x$d" != "x"; then
|
||||
target=`readlink "$f"`
|
||||
@ -63,7 +63,7 @@ grep -E '^Link:' WHENCE | sed -e's/^Link: *//g' -e's/-> //g' | while read f d; d
|
||||
fi
|
||||
else
|
||||
$verbose "creating link $f -> $d"
|
||||
install -d $destdir/$(dirname "$f")
|
||||
install -d "$destdir/$(dirname "$f")"
|
||||
ln -sf "$d" "$destdir/$f"
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user