bernd / fpm-cookery

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

Packages with local sources #164

Closed caquino closed 7 years ago

caquino commented 8 years ago

Hi,

Is it possible to package only local files? I've tried to not specify a source on the recipe but it didnt'work.

I want to package a group of scripts that are only available locally.

If it possible to point source for a local directory ?

tomeon commented 8 years ago

@caquino -- have you tried the directory or local_path source types?:

class MyRecipe < FPM::Cookery::Recipe
  source "/path/to/my/directory/with/source/files", :with => :directory
  # <snip> rest of recipe definition
end
cosmopetrich commented 7 years ago

Just in case anyone else come across this: it appears that fpm-cook will currently throw an 'unknown file type' error if you don't use a full path to your source file. See #147 for a full example.

With a full path, the directory handler appears to work as expected.

bernd commented 7 years ago

@caquino @cosmopetrich It is possible to use the :directory method as described by @BaxterStockman or use a file URI.

Example:

class YourRecipe < FPM::Cookery::Recipe
  source 'file:///path/to/your/source'
end

I will add a check to the :directory source handler to throw an error if the path is not absolute.