Permalink
Browse files

Include rebar templates into agner/rebar

  • Loading branch information...
1 parent d2cc07d commit cd73abc0241527faae08c2fbc88aa079d9039068 @yrashk yrashk committed Mar 8, 2011
Showing with 18 additions and 0 deletions.
  1. +1 −0 Makefile
  2. BIN rebar
  3. +17 −0 scripts/add_rebar_templates
View
@@ -19,6 +19,7 @@ compile: deps
@./rebar compile
@cp deps/rebar/ebin/rebar* ebin/
@./rebar escriptize
+ @./scripts/add_rebar_templates
install:
@install ./agner /usr/local/bin
View
BIN rebar
Binary file not shown.
@@ -0,0 +1,17 @@
+#! /usr/bin/env escript
+
+main([]) ->
+ {ok, [{shebang,_}, {comment,_}, {emu_args,_},
+ {archive, RebarArch}]} = escript:extract("deps/rebar/rebar",[]),
+ {ok, RebarFileList0} = zip:extract(RebarArch,[memory]),
+ RebarFileList = lists:filter(fun ({"priv/" ++ _, _}) ->
+ true;
+ (_) ->
+ false
+ end, RebarFileList0),
+ {ok, [Shebang, Comment, EmuArgs,
+ {archive, AgnerArch}]} = escript:extract("./agner",[]),
+ {ok, AgnerFileList} = zip:extract(AgnerArch,[memory]),
+ {ok, {_, Arch}} = zip:create("agner",lists:ukeysort(1,AgnerFileList ++ RebarFileList),[memory]),
+ escript:create("agner", [Shebang, Comment, EmuArgs, {archive, Arch}]).
+

0 comments on commit cd73abc

Please sign in to comment.