Permalink
Browse files

rename output command to erlca

  • Loading branch information...
1 parent a6a3cbc commit d5e62e984f54025dc1ff0f8a512969afde532be3 Dale Harvey committed with benoitc May 28, 2011
Showing with 15 additions and 15 deletions.
  1. +3 −3 Makefile
  2. +10 −10 bootstrap
  3. BIN couchapp
  4. +2 −2 src/{couchapp.erl → erlca.erl}
View
6 Makefile
@@ -13,11 +13,11 @@ deps:
doc:
@mkdir -p doc
@$(ERL) -noshell -run edoc_run application '$(APP)' '"."' '[{preprocess, true},{includes, ["."]}, {dir, "./doc"}]'
-
-clean:
+
+clean:
@./rebar clean
- @rm -f couchapp
+ @rm -f erlca
distclean: clean
@./rebar delete-deps
View
20 bootstrap
@@ -3,14 +3,14 @@
%% ex: ft=erlang ts=4 sw=4 et
main(Args) ->
-
+
%% Add ebin/ to our path
true = code:add_path("ebin"),
true = code:add_path("deps/ejson/ebin"),
true = code:add_path("deps/ibrowse/ebin"),
true = code:add_path("deps/oauth/ebin"),
true = code:add_path("deps/couchbeam/ebin"),
-
+
%% Run couchapp to do proper .app validation and such
@@ -20,9 +20,9 @@ main(Args) ->
%% Read the contents of the files in ebin and templates; note that we place
%% all the beam files at the top level of the code archive so that code loading
%% works properly.
- Files = load_files("*", "ebin")
+ Files = load_files("*", "ebin")
++ load_files("*", "deps/ejson/ebin")
- ++ load_files("*", "deps/ejson/priv")
+ ++ load_files("*", "deps/ejson/priv")
++ load_files("*", "deps/ibrowse/ebin")
++ load_files("*", "deps/oauth/ebin")
++ load_files("*", "deps/couchbeam/ebin")
@@ -33,29 +33,29 @@ main(Args) ->
%% Archive was successfully created. Prefix that binary with our
%% header and write to "rebar" file
Script = <<"#!/usr/bin/env escript\n%%! -pa . -noshell -noinput -sasl errlog_type error\n", ZipBin/binary>>,
- case file:write_file("couchapp", Script) of
+ case file:write_file("erlca", Script) of
ok ->
ok;
{error, WriteError} ->
- io:format("Failed to write couchapp script: ~p\n", [WriteError]),
+ io:format("Failed to write erlca script: ~p\n", [WriteError]),
halt(1)
end;
{error, ZipError} ->
- io:format("Failed to construct couchapp archive: ~p\n", [ZipError]),
+ io:format("Failed to construct erlca archive: ~p\n", [ZipError]),
halt(1)
end,
%% Finally, update executable perms for our script
case os:type() of
{unix,_} ->
- [] = os:cmd("chmod u+x couchapp"),
+ [] = os:cmd("chmod u+x erlca"),
ok;
_ ->
ok
end,
-
+
%% Add a helpful message
- io:format("Congratulations! You now have a self-contained script called \"couchapp\" in\n"
+ io:format("Congratulations! You now have a self-contained script called \"erlca\" in\n"
"your current working directory. Place this script anywhere in your path\n"
"and you can use build and push your design docs and docs
like couchapp.\n").
View
BIN couchapp
Binary file not shown.
View
4 src/couchapp.erl → src/erlca.erl
@@ -3,7 +3,7 @@
%%% This file is part of couchapp released under the Apache 2 license.
%%% See the NOTICE for more information.
--module(couchapp).
+-module(erlca).
-author('Benoît Chesneau <benoitc@e-engura.org>').
-export([main/1]).
@@ -15,6 +15,6 @@ main(Args) ->
{error, failed} ->
halt(1);
Error ->
- io:format("Uncaught error in couchapp_core: ~p\n", [Error]),
+ io:format("Uncaught error in erlca: ~p\n", [Error]),
halt(1)
end.

0 comments on commit d5e62e9

Please sign in to comment.