mirror of
https://github.com/correl/rebar.git
synced 2024-11-23 19:19:54 +00:00
Fix some minor typos; create simple install/bootstrapping script
This commit is contained in:
parent
f4729544dd
commit
c828f59056
3 changed files with 19 additions and 6 deletions
11
install
Executable file
11
install
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Fail on first error
|
||||
set -e
|
||||
|
||||
## Compile
|
||||
erlc -I include -o ebin src/*.erl
|
||||
|
||||
## Use application installer to perform actual installation
|
||||
## into erlang distro
|
||||
priv/rebar install
|
|
@ -49,20 +49,20 @@ install(Config, File) ->
|
|||
%% continue if it's set
|
||||
case rebar_config:get_global(force, "0") of
|
||||
"0" ->
|
||||
?ERROR("~s already exists. Installation failed."),
|
||||
?ERROR("~s already exists. Installation failed.", []),
|
||||
?FAIL;
|
||||
"1" ->
|
||||
?WARN("~s already exists, but forcibly overwriting."),
|
||||
?WARN("~s already exists, but forcibly overwriting.", [])
|
||||
end;
|
||||
false ->
|
||||
ok
|
||||
end,
|
||||
end.
|
||||
|
||||
%% Wipe out any previous versions
|
||||
ok = rebar_file_utils:rm_rf(Appdir),
|
||||
% ok = rebar_file_utils:rm_rf(Appdir),
|
||||
|
||||
%% Re-create target
|
||||
ok = rebar_file_utils:mkdir_p(AppDir),
|
||||
% ok = rebar_file_utils:mkdir_p(AppDir).
|
||||
|
||||
%% By default we copy the ebin, include, src and priv directories
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
-export([run/1]).
|
||||
|
||||
-include("rebar.hrl").
|
||||
|
||||
%% ===================================================================
|
||||
%% Public API
|
||||
%% ===================================================================
|
||||
|
@ -57,7 +59,7 @@ run(Args) ->
|
|||
update_code_path(Targets),
|
||||
|
||||
%% Finally, apply the specified command to each target
|
||||
apply_commands(Targets, Commands)
|
||||
apply_commands(Targets, Commands).
|
||||
|
||||
|
||||
%% ===================================================================
|
||||
|
|
Loading…
Reference in a new issue