[erlang-questions] priv dir in escript

Karlo Kuna kuna.prime@REDACTED
Mon Jul 30 00:10:17 CEST 2018


OK,

i have got it to work
having followed Tristan's advice and also looking at rebar3 source code

this is my conclusion:
{escript_incl_extra, [{"<wildcard_pattern>", "_build/default/lib/"}]}.

escript_incl_extra is using wildcard_pattern to search for files so if you
want all nested files one would write: "my_app/priv/**".
In the result empty folders are omitted (shame)!

On Sun, Jul 29, 2018 at 11:04 PM Tristan Sloughter <t@REDACTED> wrote:

>
> We definitely need to add this to the docs on rebar3.org, it wasn't
> documented for historical reasons but it has been stable api for years now.
>
> This should work if you replace the app name part with your app's name:
>
> {escript_incl_extra, [{"<YOUR APP NAME>/priv/*, "_build/default/lib/"}]}.
> It could use improvements to like replace os vars for the profile, but it
> at least works
>
> On Sun, Jul 29, 2018, at 2:51 PM, Karlo Kuna wrote:
>
> I'm trying to make self contained escript
> i need priv folder to be included in archive in escript
>
> currently i'm extracting files using: 'escript:extract'
> but in arhive there is no `priv` directory
>
> i'm building with rebar3 escriptize
>
> any help would be appreciated
> *_______________________________________________*
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180730/160d125e/attachment.htm>


More information about the erlang-questions mailing list