anchor.diff:              ?ERROR("Unable to generate spec: ~s\n", [Reason]),
               ?FAIL
       end.
  +
  +
  +mk_target_dir(TargetDir) ->
  +    case file:make_dir(TargetDir) of
  +        ok ->
  +            ok;
  +        {error, eexist} ->
  +            %% Output directory already exists; if force=1, wipe it out
  +            case rebar_config:get_global(force, "0") of
  +                "1" ->
  +                    rebar_file_utils:rm_rf(TargetDir),
  +                    ok = file:make_dir(TargetDir);
  +                _ ->
  +                    ?ERROR("Release target directory ~p already exists!\n", [TargetDir]),
  +                    ?FAIL
  +            end
  +    end.               
       
   
   dump_spec(Spec) ->
  
positive.code:           Name
    end.
  
  validate_rel_apps(ReltoolServer, ReltoolConfig) ->
      case lists:keysearch(rel, 1, ReltoolConfig) of
          {value, {rel, _Name, _Vsn, Apps}} ->
              %% Identify all the apps that do NOT exist, based on what's available
  
negative.code:     ReltoolConfig = load_config(ReltoolFile),
  
      %% Spin up reltool server and load our config into it
      {ok, Server} = reltool:start_server([sys_tuple(ReltoolConfig)]),
  
      %% Do some validation of the reltool configuration; error messages out of
      %% reltool are still pretty cryptic
      validate_rel_apps(Server, sys_tuple(ReltoolConfig)),
  
      %% Finally, run reltool
      case catch(run_reltool(Config, ReltoolConfig)) of
  