-#!/usr/bin/env escript
-% coding: utf-8
+#!/usr/bin/env escript\r
+% coding: utf-8\r
% Copyright 2008 Grégory Burri\r
%\r
% This file is part of Euphorik.\r
% GNU General Public License for more details.\r
%\r
% You should have received a copy of the GNU General Public License\r
-% along with Euphorik. If not, see <http://www.gnu.org/licenses/>.
+% along with Euphorik. If not, see <http://www.gnu.org/licenses/>.\r
\r
-% 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 ;)\r
+% TODO :\r
+% - création de unit tests (voir eunit) et validation avant la mise en prod\r
\r
\r
main(Args) ->\r
% A simple fonction to log message.\r
log(Str) ->\r
io:format("===== ~s =====~n", [Str]).\r
- \r
+\r
\r
% Execute an OS commande and print the result to stdout.\r
cmd(Commande_str) ->\r
- cmd(Commande_str, []). \r
+ cmd(Commande_str, []).\r
cmd(Commande_str, Params) ->\r
io:format("~s~n", [os:cmd(lists:flatten(io_lib:format(Commande_str, Params)))]).\r
\r
start_server(),\r
update_server().\r
\r
- \r
+\r
% Compile the Erlang modules.\r
compile_server_part(Uri) ->\r
todo.\r
- \r
+\r
\r
% Create the 'var' folder if it doesn't exist.\r
make_var_directory(Uri) ->\r
todo.\r
- \r
- \r
+\r
+\r
% Copy files from developpement env to production server.\r
copy_files(Uri) ->\r
copy_static_part(Uri),\r
copy_packed_js(Uri).\r
- \r
- \r
+\r
+\r
% Copy all static files like modules, styles, pages, etc.\r
copy_static_part(Uri) ->\r
%~ creer_rep('modules')\r
%~ system("rsync -r --exclude 'euphorik_test.beam' modules/ebin #{@uri}:#{@rep}/modules")\r
%~ system("rsync -r modules/include #{@uri}:#{@rep}/modules")\r
todo.\r
- \r
+\r
\r
% Minify and pack JavaScript in one file then copy it to ther server.\r
copy_packed_js(Uri) ->\r
todo.\r
- \r
- \r
+\r
+\r
% Define the rights for the copied folder et files.\r
define_files_rights(Uri) ->\r
- todo. \r
- \r
- \r
+ todo.\r
+\r
+\r
% Start the server if it not already started (in preproduction case only).\r
start_server() ->\r
todo.\r
- \r
- \r
-% Run a erlang script to \r
+\r
+\r
+% Run a erlang script to\r
update_server() ->\r
todo.\r
-
+\r