Tcl question ...

Peter Danecek Peter.Danecek at bo.ingv.it
Thu Sep 19 07:04:03 PDT 2013


Okay, I now understand this one.

On Sep 19, 2013, at 15:37 , Peter Danecek <Peter.Danecek at bo.ingv.it> wrote:
> 
>>> Another one:
>>> I also try to copy some examples into a doc directory I am trying this:
>>> --- snip ---
>>> post-destroot {
>>>  file copy ${worksrcpath}/${distname}.html ${destroot}${prefix}/share/doc/${subport}
>>>  file mkdir ${destroot}${prefix}/share/doc/${subport}/examples
>>>  file copy ${worksrcpath}/Examples ${destroot}${prefix}/share/doc/${subport}/examples
>>> }
>>> --- snap ---
>>> 
>>> In this way I end up with: 
>>> /opt/local/share/doc/py27-BitVector/BitVector-3.3.html
>>> /opt/local/share/doc/py27-BitVector/examples/Examples/BitVectorDemo.py
>>> /opt/local/share/doc/py27-BitVector/examples/Examples/README
>>> […]
>>> 
>>> But I would prefer to end up with something link this
>>> […]   
>>> /opt/local/share/doc/py27-BitVector/examples/BitVectorDemo.py
>>> /opt/local/share/doc/py27-BitVector/examples/README
>>> […] 
>> 
> 
>> Simply leave out the 'file mkdir ...' step.
> 
> I did, but the result is exactly the same. I actually, had it like this before but added the mkdir as an experiment.
> 
>> The same rules as for a normal 'cp' on the shell apply here. When
>> copying a directory into a existing directory, you end up with a
>> subdirectory. If you specify a last path component that does not exist
>> yet, that is the name of the copied directory.
> 
> Here, it seems to be slightly different. I experimented with and without trailing `/` but nothing changes. For Unix `cp -R` this matter!

The mentioned directory i.e.  `/opt/local/share/doc/py27-BitVector/examples/`
seems to be created automatically by `destroot`. That's why the commands showed unexpected behaviour. 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1762 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20130919/b7ebb428/attachment.p7s>


More information about the macports-dev mailing list