dbaf4f9156
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
65 lines
2.2 KiB
Diff
65 lines
2.2 KiB
Diff
From 6d7b6dca598f26fa5b46561b851e6b8286a50662 Mon Sep 17 00:00:00 2001
|
|
From: Peter Lemenkov <lemenkov@gmail.com>
|
|
Date: Tue, 28 Sep 2010 23:04:36 +0400
|
|
Subject: [PATCH 1/8] No need to create bundle
|
|
|
|
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
|
---
|
|
bootstrap | 40 ----------------------------------------
|
|
1 file changed, 40 deletions(-)
|
|
|
|
diff --git a/bootstrap b/bootstrap
|
|
index e86ad8e..c4992a7 100755
|
|
--- a/bootstrap
|
|
+++ b/bootstrap
|
|
@@ -52,46 +52,6 @@ main(Args) ->
|
|
%% Run rebar to do proper .app validation and such
|
|
rebar:main(["compile"] ++ 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") ++ load_files("priv/templates/*", "."),
|
|
-
|
|
- case zip:create("mem", Files, [memory]) of
|
|
- {ok, {"mem", ZipBin}} ->
|
|
- %% Archive was successfully created. Prefix that binary with our
|
|
- %% header and write to "rebar" file.
|
|
- %% Without -noshell -noinput escript consumes all input that would
|
|
- %% otherwise go to the shell for the next command.
|
|
- Script = <<"#!/usr/bin/env escript\n%%! -noshell -noinput\n",
|
|
- ZipBin/binary>>,
|
|
- case file:write_file("rebar", Script) of
|
|
- ok ->
|
|
- ok;
|
|
- {error, WriteError} ->
|
|
- io:format("Failed to write rebar script: ~p\n",
|
|
- [WriteError]),
|
|
- halt(1)
|
|
- end;
|
|
- {error, ZipError} ->
|
|
- io:format("Failed to construct rebar script archive: ~p\n",
|
|
- [ZipError]),
|
|
- halt(1)
|
|
- end,
|
|
-
|
|
- %% Finally, update executable perms for our script on *nix,
|
|
- %% or write out script files on win32.
|
|
- case os:type() of
|
|
- {unix,_} ->
|
|
- [] = os:cmd("chmod u+x rebar"),
|
|
- ok;
|
|
- {win32,_} ->
|
|
- write_windows_scripts(),
|
|
- ok;
|
|
- _ ->
|
|
- ok
|
|
- end,
|
|
-
|
|
%% Add a helpful message
|
|
io:format("Congratulations! You now have a self-contained script called"
|
|
" \"rebar\" in\n"
|
|
--
|
|
1.7.10.2
|
|
|