|
From: Bruce S. <bw...@ar...> - 2003-11-03 00:40:27
|
> I need to copy some files (kernel modules) on the install stage of the
> alsa-driver script to $CDDIR/lib/modules/2.4.22.
>
> What is the difference between these two lines and which one should i use?
>
> cp -dpR $WORKDIR/tmp/* $CDDIR || exit 1
>
> copy_files $WORKDIR/tmp/lib/modules/ $CDDIR/ || exit 1
There is no difference between the two (in this case)
except for the "-f" cp option.
copy_files is a function defined in build/script/functions
copy_files()
{
for FILE in $1
do
cp -dpfR $FILE $2
done
}
> another one:
>
> copy_files $WORKDIR/tmp/usr $CDDIR/ || exit 1
>
> is the same as
>
> copy_files $WORKDIR/tmp/usr $CDDIR/usr || exit 1
The first one is right, the second one will not do what you want.
The second one would copy files under $CDDIR/usr/usr/files.
(double /usr which is wrong)
copy_files $WORKDIR/tmp/usr/* $CDDIR/usr
would work correctly (except for hidden files/directories)
Confused yet? :-)
- BS
|