anchor.diff:  %%% @doc
   -module(relcool).
   
  --export([main/1, opt_spec_list/0]).
  +-export([main/1,
  +         do/7,
  +         opt_spec_list/0]).
   
   %%============================================================================
   %% types
  
positive.code:     getopt:usage(opt_spec_list(), "relcool", "[*release-specification-file*]").
  
  
  -spec report_error(term()) -> none().
  report_error(Error) ->
      io:format("~s~n", [to_error(Error)]),
      usage(),
      erlang:halt(127).
  
  -spec to_error(string() | {error, Reason::term()}) -> string().
  to_error(String) when erlang:is_list(String) ->
  
negative.code:     OptSpecList = opt_spec_list(),
      case rcl_cmd_args:args2state(getopt:parse(OptSpecList, Args)) of
          {ok, {State, _Target}} ->
              run_relcool_process(rcl_state:caller(State, command_line));
          Error={error, _} ->
              report_error(rcl_state:caller(rcl_state:new([], []),
                                            command_line), Error)
      end.
  
  
  %% @doc provides an API to run the Relcool process from erlang applications
  %%
  %% @param RelName - The release name to build (maybe `undefined`)
  %% @param RelVsn - The release version to build (maybe `undefined`)
  %% @param Goals - The release goals for the system in depsolver or Relcool goal
  %% format
  %% @param LibDirs - The library dirs that should be used for the system
  %% @param OutputDir - The directory where the release should be built to
  %% @param Configs - The list of config files for the system
  do(RelName, RelVsn, Goals, LibDirs, LogLevel, OutputDir, Configs) ->
      State = rcl_state:new([{relname, RelName},
                             {relvsn, RelVsn},
                             {goals, Goals},
                             {output_dir, OutputDir},
                             {lib_dirs, LibDirs},
                             {log, rcl_log:new(LogLevel)}],
                            Configs),
      run_relcool_process(rcl_state:caller(State, api)).
  
  -spec opt_spec_list() -> [getopt:option_spec()].
  opt_spec_list() ->
  