cp -R behaviour

i 've noticed the following difference between freebsd cp and gnu cp

from the freebsd cp man page:

     -R    ... If the source_file ends in a /, the contents of the directory are copied rather than
       the directory itself. ...
on gnu cp from the man page

while on gnu cp manpage:

�-r' �--recursive'

Copy directories recursively. Symbolic links are not
followed by default; see the --archive (-a), -d, --dereference (-L),
     --no-dereference (-P), and -H options. Special files are copied by
     creating a destination file of the same type as the source; see the
     --copy-contents option. It is not portable to use -r to copy symbolic
     links or special files. On some non-gnu systems, -r implies the
     equivalent of -L and --copy-contents for historical reasons. Also, it
     is not portable to use -R to copy symbolic links unless you also
     specify -P, as POSIX allows implementations that dereference symbolic
     links by default. 

the difference above creates problems when one wants to copy all files from a directory to another directory, without copying
the directory itself.

for example what i want to do is copy some files from a source directory and overwrite some files in
the destination directory, i want to do this using a script.

if i ran the script on freebsd i could do something like this

#!/usr/bin/env bash

sourcee='original-configuration/source/'
destination='/etc/destin'

cp -rv ${sourcee} ${destination

}

but in linux i have the following:

#!/usr/bin/env bash

sourcee='original-configuration/source'
destination='/etc/destin'

cp -rv ${sourcee}/* --target-directory=${destination}

is it possible no to use shell globing with gnu cp?
should i use a different tool? or should i use gnu cp in a different way?

thanks in advance for your answers,
nicolas

Use the same code for both FreeBSD and Linux:

cp -Rv "$sourcee" "$destination"

Other varieties may not have the -v option.

thanks for your answer cfajohnson!

but this requires that i do the paste one level up from where i want...

for example i have a folder settings which contains file1.conf file2.conf and i want to insert those files on /etc

to use your way: i have to rename settings to etc and then copy etc to /

am i correct on this?

with the bsd-cp i do a normal copy append to source path '/' and get the directory contents...