Howto remove empty dirs in post-deactivate?

Peter Danecek Peter.Danecek at bo.ingv.it
Wed Apr 16 13:34:05 PDT 2014


Hi all,

I am looking for an elegant way to remove some directory (directories) if they are empty in a Portfile.

I would like to use this in the post-deactivate hook. There I remove some unregistered files, after related registered files are deactivated. However, afterwords I'd like to check if the dir now is empty and conditionally remove it. 

I am not very fluent in TCL, so any tip how to do this in an elegant way is welcome.

Thanks!
~petr

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


More information about the macports-dev mailing list