-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gontran Zepeda wrote:
> % On 2005-02-14 at 10:51:50 -0500, Aaron Walker wrote:
> 
>>>But what do you do if you have executable and non-executable files mixed
>>>in the subtree?
>>>[ ... ]
>>
>>Georgi Georgiev wrote:
>>
>>AFAIK, there's not a gentoo way to recursively copy files whilst preserving
>>permissions when said files are of different permissions.
>>[ ... ]

> Perhaps a small addition to 'doins' for this case, which could be
> made optional by adding a '-p' for "preserve mode" option.  Untested patch
> attached which could use some getopt mojo for flexible argument order.
> 
> Requires GNU fileutils >= 4.0 according to chmod(1).  Portage internal
> variables not entirely clear to me without RTFM.  Portage hackers: please
> suggest corrections.

<snip>

>       install ${INSOPTIONS} "${mysrc}" "${D}${INSDESTTREE}"
> +
> +     if [ "${PRESERVE_PERMS}" == "y" ] ; then
> +             chmod --referencefile="${mysrc}" "${D}${INSDESTTREE}/${mysrc}"
> +     fi
>  done
> 

Unfortunately this would only work on systems with a GNU base system.

- --
<carpaski> You know what the major difference between rsync and cvs is?
<iggy> a few hours

Aaron Walker <[EMAIL PROTECTED]>
[ BSD | cron | forensics | shell-tools | commonbox | netmon | vim | web-apps ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCEiW1C3poscuANHARAhcdAJ9+6vCAtltFa9Klc7w8L6fZJpbHNACg2N29
dmPzxdq6GE4OtG9fSgKLc2s=
=IGbu
-----END PGP SIGNATURE-----
--
[email protected] mailing list

Reply via email to