anchor.diff:  
   %%------------------------------------------------------------------------------
   
  -do(Args, Params) ->
  -    do(Args, Params, false, []).
  -
  -do(["--config", Config | T], P, J, Acc) ->
  -    do(T, P, false, add_config(Config,                 add_joins(J, Acc)));
  -do(["-f" | T],               P, J, Acc) ->
  -    do(T, P, false, bld_lib:ensure_member(do_delete,   add_joins(J, Acc)));
  -do(["-i", Node | T],         P, J, Acc) ->
  -    do(T, P, false, bld_lib:add_node(Node, install, P, add_joins(J, Acc)));
  -do(["-s", Node | T],         P, J, Acc) ->
  -    do(T, P, false, bld_lib:add_node(Node, setup,   P, add_joins(J, Acc)));
  -do(["-j", Type | T],         P, J, Acc) ->
  -    do(T, P, [add_join_type(Type, P)],                 add_joins(J, Acc));
  -do([],                       P, J, Acc) ->
  +parse(Args, Params) ->
  +    parse(Args, Params, false, []).
  +
  +parse(["--config", Config | T], P, J, Acc) ->
  +    parse(T, P, false, add_config(Config,                 add_joins(J, Acc)));
  +parse(["-f" | T],               P, J, Acc) ->
  +    parse(T, P, false, bld_lib:ensure_member(do_delete,   add_joins(J, Acc)));
  +parse(["-i", Node | T],         P, J, Acc) ->
  +    parse(T, P, false, bld_lib:add_node(Node, install, P, add_joins(J, Acc)));
  +parse(["-s", Node | T],         P, J, Acc) ->
  +    parse(T, P, false, bld_lib:add_node(Node, setup,   P, add_joins(J, Acc)));
  +parse(["-j", Type | T],         P, J, Acc) ->
  +    parse(T, P, [add_join_type(Type, P)],                 add_joins(J, Acc));
  +parse([],                       P, J, Acc) ->
       add_seq(P, ensure_nodes(P, lists:reverse(add_joins(J, Acc))));
  -do(Other,                    _P, false, _Acc) ->
  +parse(Other,                    _P, false, _Acc) ->
       bld_lib:halt_badarg(Other);
  -do([Type | T],               P, J, Acc) ->
  -    do(T, P, [add_join_type(Type, P) | J], Acc).
  +parse([Type | T],               P, J, Acc) ->
  +    parse(T, P, [add_join_type(Type, P) | J], Acc).
   
   add_joins(false, Acc) -> Acc;
   add_joins(Join, Acc) -> [{join, lists:reverse(Join)} | Acc].
  
positive.code:     NewElem.
  
  %%------------------------------------------------------------------------------
  
  check_release() ->
      Fun = fun({dir, Dir}) -> filelib:is_dir(Dir);
               ({file, File}) -> filelib:is_regular(File)
            end,
  
      case lists:all(Fun, ?RELCHECK) of
          true -> ok;
          false -> bld_lib:print(err1()), halt(1)
      end.
  
  err1() ->
      [
       "Incorrect folder structure!",
       "Please make sure that the release has been created correctly and run",
       "this script from the root of the folder containing the release.",
       "Use -h or --help for more options."
      ].
  
  
  check_not_running(Nodes) ->
      case bld_lib:intersection(bld_lib:running_nodes(), Nodes) of
  
negative.code: 
  -include_lib("builderl/include/builderl.hrl").
  
  -export([do/1]).
  
  -define(CMDSH, fun(NodeName) -> NodeName ++ ".cmd.sh" end).
  -define(TIMEOUT, 15000).
  
  %% Folder that can be used to load patches to the running system.
  %% Since the script installs OTP releases that should be upgraded using the
  %% OTP release handler, we don't want the patches folder to be per node nor
  %% to be easily accessible to prevent people from using it as a mean to upgrade
  %% nodes. One common patches folder for quick checks should be enough.
  -define(PATCHES, <<"/tmp/code_patches">>).
  
  -define(RELCHECK,
          [{dir, <<"lib">>},
           {file, <<"releases/start_erl.data">>}
          ]).
  
  -define(DIRS,
          [<<"bin">>,
           <<"etc">>,
           <<"etc/init.d">>,
           <<"config">>,
           <<"log">>,
           <<"sasl_logfiles">>,
           <<"shell">>]).
  
  usage(DefNodes, DefJoins, Allowed) ->
      [
       "************************************************************************",
       "This script installs and configures an OTP-compliant release.",
       "It creates new target folders, one folder per each node, alongside",
       "the folder containing the release (as siblings of that folder).",
       "All nodes share the same code contained in the release folder but use",
       "the created target folders to store data specific to each node",
       "(e.g. logs, the mnesia database, configuration files, etc.).",
       "This script should be run from the root of the folder containing the",
       "release.",
       "",
       "Usage:",
       "",
       "  init.esh -h | --help",
       "  init.esh [-f] [--config <section>]",
       "           [-i (<type> | <type>-<suffix>)]...",
       "           [-s (<type> | <type>-<suffix>)]...",
       "           [-j (<type> | <type>-<suffix> | <node@host>)[, ...]]...",
       "",
       "  init.esh [-f] [--config <section>]",
       "    Calling init.esh without neither '-i' nor '-s' automatically adds",
       "    the following default options:",
       "      " ++ DefNodes,
       "      " ++ DefJoins,
       "",
       "During installation the following steps are executed:",
       " 1. Create the destination folder for each node.",
       " 2. Set up the node, copy and update the configuration files.",
       " 3. Start all nodes supplied with '-i' or '-s'.",
       " 4. Execute the installation module on nodes supplied with '-i'.",
       " 5. Stop all nodes supplied with '-i'",
       "    (nodes supplied with '-s' remain running).",
       "",
       "Options:",
       "",
       "  -h, --help",
       "    This help.",
       "",
       "  -f",
       "    Force install, delete the target folders if they already exist.",
       "",
       "  --config section",
       "    Name of the config section from the 'etc/init.conf' file. This file",
       "    contains additional strings that will be replaced in application",
       "    configuration files when installing them to the 'config' folder",
       "    on the target system.",
       "    If the section is not specified explicitly then the script tries",
       "    to read the name of the section from the environment variable",
       "    'HOSTNAME'.",
       "",
       "  -i <type>, -i <type>-<suffix>",
       "    Installs the specified node into a new folder, installs the",
       "    configuration files, starts the node, executes the installation",
       "    module and stops the node.",
       "    Can be specified multiple times, e.g.: -i node1 -i node2.",
       "    Accepted types are: " ++ string:join(Allowed, ", ") ++ ".",
       "    Multiple nodes of the same type may be installed by listing them",
       "    with an optional suffix, e.g.: -i node-1 -i node-2.",
       "    Suffix must match the following regular expression: '^[\\w-.#+]+$'.",
       "",
       "  -s <type>, -s <type>-<suffix>",
       "    Similar to '-i' above but stops after the nodes have been set up,",
       "    without executing the installation module on the installed nodes.",
       "    To be used when some nodes need to be installed and configured",
       "    together. It will install the specified node in a new folder,",
       "    install the configuration files, then it will start the specified",
       "    node and will leave it running. That node can then be supplied with",
       "    the '-j' argument when installing another node.",
       "    (See '-j' for more information).",
       "",
       "  -j (<type> | <type>-<suffix> | <node@host>)...",
       "    Used by the node installation module (e.g. to create a shared mnesia",
       "    scheme). Causes the list of nodes specified after a single '-j' to",
       "    be configured together. Can be specified multiple times and each",
       "    list is space-separated (the list is collected until another option",
       "    is found or until the end of the line), e.g.:",
       "    -j node-1 node-2 node-3 -j service 'node@host.org -j database",
       "",
       "    Nodes specified with <type> or <type>-<suffix> also need to be",
       "    specified with '-i' so that they can be installed and configured,",
       "    and the proper node names used when executing the installation",
       "    module.",
       "",
       "    Nodes specified with <node@host> are assumed to be already installed",
       "    and started (see '-s' above). Value of <node@host> should be an atom",
       "    as returned from erlang:node/0 on the actual node. Host 'host' may",
       "    be either a short name or a fully qualified name. All <node@host>",
       "    values will be passed to the installation script as is, however the",
       "    script will try to connect to the specified nodes before progressing",
       "    with the configuration. Therefore nodes specified with <node@host>",
       "    should use the same cookie as one of the nodes installed with '-i'",
       "    during the same script execution, otherwise the script won't be able",
       "    to connect to such node.",
       "",
       "    This option may be specified multiple times with the same nodes.",
       "    Each occurence will result in executing the installation module with",
       "    all nodes specified for a particular occurence of '-j' as one of the",
       "    arguments of that execution.",
       "************************************************************************"
      ].
  
  %%------------------------------------------------------------------------------
  
  do(Args) ->
      check_release(),
      RunVars = runtime_variables(),
      do1(Args, RunVars).
  
  do1(["-h"], RunVars) ->     print_usage(RunVars);
  do1(["--help"], RunVars) -> print_usage(RunVars);
  do1(Other, RunVars) ->      do2(Other, RunVars).
  
  print_usage(RunVars) ->
      DefNodes = bld_lib:get_default_nodes(RunVars),
      DefJoins = bld_lib:get_default_joins(RunVars),
      Nodes = ["-i " | string:join(DefNodes, " -i ")],
      Joins = string:join(joins_to_str(DefJoins, ""), " "),
      Allowed = bld_lib:get_allowed(RunVars),
      bld_lib:print(usage(Nodes, Joins, Allowed)).
  
  joins_to_str([{join, List} | T], Acc) ->
      Nodes = string:join(joins_to_str(List, ""), " "),
      joins_to_str(T, [Nodes, "-j" | Acc]);
  joins_to_str([{Node, []} | T], Acc) ->
      joins_to_str(T, [atom_to_list(Node) | Acc]);
  joins_to_str([{Node, Suffix} | T], Acc) ->
      joins_to_str(T, [atom_to_list(Node) ++ "-" ++ Suffix | Acc]);
  joins_to_str([], Acc) ->
      lists:reverse(Acc).
  
  do2(Other, RunVars) ->
      Params = bld_lib:get_params(RunVars),
      Options = parse(Other, Params),
      kick_off(Params, Options).
  
  check_release() ->
      Fun = fun({dir, Dir}) -> filelib:is_dir(Dir);
               ({file, File}) -> filelib:is_regular(File)
            end,
  
      case lists:all(Fun, ?RELCHECK) of
          true -> ok;
          false -> bld_lib:print(err1()), halt(1)
      end.
  
  err1() ->
      [
       "Incorrect folder structure!",
       "Please make sure that the release has been created correctly and run",
       "this script from the root of the folder containing the release.",
       "Use -h or --help for more options."
      ].
  
  runtime_variables() ->
      {_, Vsn} = StartErl = bld_lib:start_erl_data(),
  