bernd / fpm-cookery

A tool for building software packages with fpm.
Other
460 stars 88 forks source link

Add `sourcedir` method. #142

Closed phyber closed 8 years ago

phyber commented 8 years ago

It would be handy if there were a sourcedir method available to recipes, like builddir, etc. Currently, I am using

    def after_source_extraction(source_dir)
        @source_dir = source_dir
    end

to grab the source dir after it has been extracted to use later on. This workaround is fine, but it feels like adding a sourcedir alongside the other methods would be nicer.

I have seen the extracted_source variable, but it seems that this is for telling fpm-cookery where you want the source extracted to, rather than fpm-cookery simply telling me where the source ended up after extraction. I base this on my putsing extracted_source during #install and it being blank.

If I'm wrong and this information is already exposed somewhere, pointers would be appreciated. Thanks.

bernd commented 8 years ago

I added a sourcedir method to the recipe class. Nice idea! :smiley:

This will be available in the next release.