Skip to content
This repository
Browse code

Include rebar templates into agner/rebar

  • Loading branch information...
commit cd73abc0241527faae08c2fbc88aa079d9039068 1 parent d2cc07d
Yurii Rashkovskii authored March 07, 2011
1  Makefile
@@ -19,6 +19,7 @@ compile: deps
19 19
 	@./rebar compile
20 20
 	@cp deps/rebar/ebin/rebar* ebin/
21 21
 	@./rebar escriptize
  22
+	@./scripts/add_rebar_templates
22 23
 
23 24
 install:
24 25
 	@install ./agner /usr/local/bin
BIN  rebar
Binary file not shown
17  scripts/add_rebar_templates
... ...
@@ -0,0 +1,17 @@
  1
+#! /usr/bin/env escript
  2
+
  3
+main([]) ->
  4
+    {ok, [{shebang,_}, {comment,_}, {emu_args,_},
  5
+          {archive, RebarArch}]} = escript:extract("deps/rebar/rebar",[]),
  6
+    {ok, RebarFileList0} = zip:extract(RebarArch,[memory]),
  7
+    RebarFileList = lists:filter(fun ({"priv/" ++ _, _}) ->
  8
+                                      true;
  9
+                                     (_) ->
  10
+                                      false
  11
+                                 end, RebarFileList0),
  12
+    {ok, [Shebang, Comment, EmuArgs,
  13
+          {archive, AgnerArch}]} = escript:extract("./agner",[]),
  14
+    {ok, AgnerFileList} = zip:extract(AgnerArch,[memory]),
  15
+    {ok, {_, Arch}} = zip:create("agner",lists:ukeysort(1,AgnerFileList ++ RebarFileList),[memory]),
  16
+  escript:create("agner", [Shebang, Comment, EmuArgs, {archive, Arch}]).
  17
+

0 notes on commit cd73abc

Please sign in to comment.
Something went wrong with that request. Please try again.