Maxim Sokhatsky 10 лет назад
Родитель
Сommit
1e531ffbe0
3 измененных файлов с 25 добавлено и 5 удалено
  1. 24 4
      README.md
  2. BIN
      mad
  3. 1 1
      src/mad_run.erl

+ 24 - 4
README.md

@@ -18,12 +18,32 @@ Build
 
 
 And put 'mad' to PATH.
 And put 'mad' to PATH.
 
 
-Usage
------
+Unikernel Bundle
+----------------
+
+Bundle is a gzipped archive of erlang beams of all dependecies
+along with directory structure of OTP-applications with priv directories.
+This allows you to pack all site inside single portable escript package able
+to run under Windows, Linux and Mac. Releases includes all current
+directory exept sources both code and data with all dependencies.
 
 
-    $ mad deps compile repl
     $ mad app "sample"
     $ mad app "sample"
-    $ mad deps compile bundle "web_app"
+    $ cd sample
+    $ mad deps compile plan bundle "web_app"
+    $ ./web_app
+
+Building OTP Release
+--------------------
+
+Releases are bundles made by release_handler module of sasl applications.
+It has it own fat bootstripts along with erlang runtime included.
+This allows you to distribute you applications with copy deploy
+without Erlang prerequisite.
+
+    $ mad app sample
+    $ cd sample
+    $ mad dep com pla release
+    $ _rel/bin/sample console
 
 
 Credits
 Credits
 -------
 -------


+ 1 - 1
src/mad_run.erl

@@ -9,7 +9,7 @@ start(_) ->
          {"ERL_LIBS","apps:deps"}]),
          {"ERL_LIBS","apps:deps"}]),
     case Status == 0 of
     case Status == 0 of
          true -> skip;
          true -> skip;
-         false -> io:format("Shell Error: ~s~n\r",[binary_to_list(X)]) end.
+         false -> io:format("Shell Error: ~s~n\r",[binary_to_list(X)]), exit({error,X}) end.
 
 
 attach(_) ->
 attach(_) ->
     io:format("to_erl .devbox/~n"). % use like $(mad attach)
     io:format("to_erl .devbox/~n"). % use like $(mad attach)