On 20.02.23 20:48, Andres Freund wrote:
> On 2023-02-20 19:43:56 +0100, Peter Eisentraut wrote:
>> I don't think any callers try to copy a directory source, so the
>> shutil.copytree() stuff isn't necessary.
>
> I'd like to use it for installing docs outside of the normal install
> target. Of course we could add the ability at a later point, but that seems a
> bit pointless back-forth to me.
I figured it could be useful as a general installation tool, but the
current script has specific command-line options for this specific
purpose, so I don't think it would work for your purpose anyway.
For the purpose here, we really just need something that does
for src in sys.argv[1:-1]:
shutil.copy2(src, sys.argv[-1])
But we need to call it twice for different sets of files and
destinations, and since we can't have more than one command per test, we
either need to write two "tests" or write a wrapper script like the one
we have here.
I don't know what the best way to slice this is, but it's not a lot of
code that we couldn't move around again in the future.