Browse Source

fix error with ./mad up

Namdak Tonpa 10 years ago
parent
commit
ce72016ab0
7 changed files with 10 additions and 7 deletions
  1. 1 3
      Makefile
  2. 2 0
      doc/bundles.tex
  3. 4 0
      doc/setup.tex
  4. 0 1
      doc/synrc.tex
  5. 1 1
      include/mad.hrl
  6. BIN
      mad
  7. 2 2
      src/mad_deps.erl

+ 1 - 3
Makefile

@@ -1,5 +1,3 @@
-default: escript
-escript:
+default:
 	echo "-define(VERSION,\"`git rev-parse HEAD | head -c 6`\")." > include/mad.hrl
 	./mad cle dep com bun mad
-.PHONY: escript

+ 2 - 0
doc/bundles.tex

@@ -15,6 +15,8 @@ N2O also comes with custom cowboy static handler that is able to
 read static files from this cached ETS filesystem.
 Also bundle are compatible with active online realoading and recompilation.
 
+E.g. you main create
+
 \subsection{Releases with RELX}
 
 \subsection{Re with OTP.MK}

+ 4 - 0
doc/setup.tex

@@ -23,6 +23,10 @@ If you want you can compile mad by yourself:
     # git clone http://github.com/synrc/mad \
              && cd mad \
              && make
+
+    # cat Makefile
+      default:
+          ./mad cle dep com bun mad
 \end{lstlisting}
 \vspace{1\baselineskip}
 

+ 0 - 1
doc/synrc.tex

@@ -11,7 +11,6 @@
 \usepackage[utf8]{inputenc}
 \usepackage{moreverb}
 \usepackage{listings}
-\usepackage{hevea}
 \usepackage[none]{hyphenat}
 \usepackage{caption}
 \usepackage[usenames,dvipsnames]{color}

+ 1 - 1
include/mad.hrl

@@ -1 +1 @@
--define(VERSION,"94547f").
+-define(VERSION,"1cbb25").

BIN
mad


+ 2 - 2
src/mad_deps.erl

@@ -5,7 +5,7 @@
 pull(_,[])         -> false;
 pull(Config,[F|T]) ->
     io:format("==> up: ~p~n", [F]),
-    {_,Status,Message} = sh:run(io_lib:format("cd ~p && git pull && cd -",[F])),
+    {_,Status,Message} = sh:run(lists:concat(["cd ",F," && git pull && cd -"])),
     case Status of
          0 -> mad_utils:verbose(Config,Message), pull(Config,T);
          _ -> case binary:match(Message,[<<"You are not currently on a branch">>]) of
@@ -16,7 +16,7 @@ up(Config,Params) ->
     List = case Params of
                 [] -> [ F || F <- mad_repl:wildcards(["deps/*"]), filelib:is_dir(F) ];
                 Apps -> [ "deps/" ++ A || A <- Apps ] end ++ ["."],
-    lists:any(fun(X) -> X end, [ pull(Config,F) || F <- List ]).
+    pull(Config,List).
 
 fetch(_, _Config, _, []) -> false;
 fetch(Cwd, Config, ConfigFile, [H|T]) when is_tuple(H) =:= false -> fetch(Cwd, Config, ConfigFile, T);