[aur-general] "install" recursive?

郑文辉 techlivezheng at gmail.com
Wed Nov 30 07:49:57 EST 2011


2011/11/29 Jonathan Steel <jsteel at vorx.com>

> Hi,
>
> I was told it was best practice to use "install" rather than "mkdir"
> and "cp" in a PKGBUILD, but how can you copy a directory and its
> contents (recursively) using "install"?
>
> If you cannot, with a folder with lots of files, is it best practice
> to list every file to copy with "install", or use one command to "cp"
> the whole folder?
>
> Thanks,
>
> Jonathan
>

I used to combine find and install together to accomplish that.

For example:

    find . -type d -exec install -d {,${pkgdir}/opt/xmail/}{} \;
    find . -type f -exec install -D -m 644 {,${pkgdir}/opt/xmail/}{} \;


More information about the aur-general mailing list