populate-volatile.sh: use 'cp -a' to avoid potential problem
Previously, dead links in target directory will not be copied. This is incorrect as dead links are not uncommon in our rootfs. So we use '-a' option instead. (From OE-Core rev: 742440441222e0627abbdd3eb2ee16401e8f4adf) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
a7e8f83cbe
commit
4485cd903e
|
@ -72,7 +72,8 @@ link_file() {
|
||||||
if [ -L \"$2\" ]; then
|
if [ -L \"$2\" ]; then
|
||||||
[ \"\$(readlink -f \"$2\")\" != \"\$(readlink -f \"$1\")\" ] && { rm -f \"$2\"; ln -sf \"$1\" \"$2\"; };
|
[ \"\$(readlink -f \"$2\")\" != \"\$(readlink -f \"$1\")\" ] && { rm -f \"$2\"; ln -sf \"$1\" \"$2\"; };
|
||||||
elif [ -d \"$2\" ]; then
|
elif [ -d \"$2\" ]; then
|
||||||
for f in $2/* $2/.[^.]*; do [ -e \$f ] && cp -rf \$f $1; done;
|
cp -a $2/* $1 2>/dev/null;
|
||||||
|
cp -a $2/.[!.]* $1 2>/dev/null;
|
||||||
rm -rf \"$2\";
|
rm -rf \"$2\";
|
||||||
ln -sf \"$1\" \"$2\";
|
ln -sf \"$1\" \"$2\";
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue