anchor.diff:      Dir.
   
   
  +is_arch(ArchRegex) ->
  +    Arch = erlang:system_info(system_architecture),
  +    case re:run(Arch, ArchRegex, [{capture, none}]) of
  +        match ->
  +            true;
  +        nomatch ->
  +            false
  +    end.
  +
   get_os() ->
       Arch = erlang:system_info(system_architecture),
       case match_first([{"linux", linux}, {"darwin", darwin}], Arch) of
  
positive.code:         nomatch ->
             match_first(Rest, Val)
      end.
  
negative.code:             {unknown, Arch};
          ArchAtom ->
              ArchAtom
      end.
  
  
  sh(Command, Env) ->
      ?INFO("sh: ~s\n~p\n", [Command, Env]),
      Port = open_port({spawn, Command}, [{env, Env}, exit_status, {line, 16384},
                                          use_stdio, stderr_to_stdout]),
      sh_loop(Port).
  
  sh_failfast(Command, Env) ->
      case sh(Command, Env) of
          ok ->
              ok;
          {error, Rc} ->
              ?ERROR("~s failed with error: ~w\n", [Command, Rc]),
              ?FAIL
      end.
  
  
  