Browse files

better selection of priv dir

  • Loading branch information...
1 parent 3b6618d commit c89f3edd52b5d14ad046c15e0f6dfc443d4c2e97 @abhay abhay committed with May 11, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/neotoma.erl
View
2 src/neotoma.erl
@@ -31,7 +31,7 @@ file(InputGrammar, Options) ->
ModuleAttrs = generate_module_attrs(ModuleName),
EntryFuns = generate_entry_functions(Root),
TransformFun = create_transform(TransformModule, OutputDir, GenTransform),
- {ok, PegIncludes} = file:read_file(code:priv_dir(neotoma) ++ "/peg_includes.erl"),
+ {ok, PegIncludes} = file:read_file(filename:join([filename:dirname(code:which(neotoma)), "..", "priv", "peg_includes.erl"])),
file:write_file(OutputFilename, [ModuleAttrs, "\n", Code, "\n", EntryFuns, "\n", Rules, "\n", TransformFun, "\n", PegIncludes]).
validate_params(InputGrammar, _, _, OutputFile) when InputGrammar =:= OutputFile ->

0 comments on commit c89f3ed

Please sign in to comment.