X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=tools%2Ftools.erl;h=d5c24bf6a457656b558c7fe94aa78ea7f99f6437;hp=ffab671e32967e61f25cac3c571da4bad2f9e98f;hb=81393a74d648e4830dc8c7c562fa203f50a105f6;hpb=828daf607fdce322ea17c1786dff84f712aa1632
diff --git a/tools/tools.erl b/tools/tools.erl
old mode 100644
new mode 100755
index ffab671..d5c24bf
--- a/tools/tools.erl
+++ b/tools/tools.erl
@@ -1,5 +1,5 @@
-#!/usr/bin/env escript
-% coding: utf-8
+#!/usr/bin/env escript
+% coding: utf-8
% Copyright 2008 Grégory Burri
%
% This file is part of Euphorik.
@@ -15,11 +15,11 @@
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
-% along with Euphorik. If not, see .
+% along with Euphorik. If not, see .
-% This file replace the old one 'tools.rb' written in a crapy language ;)
-% TODO :
-% - création de unit tests (voir eunit) et validation avant la mise en prod
+% This file replace the old one 'tools.rb' written in a crapy language ;)
+% TODO :
+% - création de unit tests (voir eunit) et validation avant la mise en prod
main(Args) ->
@@ -44,11 +44,11 @@ main(Args) ->
% A simple fonction to log message.
log(Str) ->
io:format("===== ~s =====~n", [Str]).
-
+
% Execute an OS commande and print the result to stdout.
cmd(Commande_str) ->
- cmd(Commande_str, []).
+ cmd(Commande_str, []).
cmd(Commande_str, Params) ->
io:format("~s~n", [os:cmd(lists:flatten(io_lib:format(Commande_str, Params)))]).
@@ -94,47 +94,47 @@ in_preprod(Uri, data_path) ->
start_server(),
update_server().
-
+
% Compile the Erlang modules.
compile_server_part(Uri) ->
todo.
-
+
% Create the 'var' folder if it doesn't exist.
make_var_directory(Uri) ->
todo.
-
-
+
+
% Copy files from developpement env to production server.
copy_files(Uri) ->
copy_static_part(Uri),
copy_packed_js(Uri).
-
-
+
+
% Copy all static files like modules, styles, pages, etc.
copy_static_part(Uri) ->
%~ creer_rep('modules')
%~ system("rsync -r --exclude 'euphorik_test.beam' modules/ebin #{@uri}:#{@rep}/modules")
%~ system("rsync -r modules/include #{@uri}:#{@rep}/modules")
todo.
-
+
% Minify and pack JavaScript in one file then copy it to ther server.
copy_packed_js(Uri) ->
todo.
-
-
+
+
% Define the rights for the copied folder et files.
define_files_rights(Uri) ->
- todo.
-
-
+ todo.
+
+
% Start the server if it not already started (in preproduction case only).
start_server() ->
todo.
-
-
-% Run a erlang script to
+
+
+% Run a erlang script to
update_server() ->
todo.
-
+