anchor.diff:  % the License.
   -module(couch_plugins).
   -include("couch_db.hrl").
  --export([install/1]).
  +-export([install/1, uninstall/1]).
   
   % couch_plugins:install({"geocouch", "http://127.0.0.1:8000", "1.0.0", [{"R15B03", "+XOJP6GSzmuO2qKdnjO+mWckXVs="}]}).
   % couch_plugins:install({"geocouch", "http://people.apache.org/~jan/", "couchdb1.2.x_v0.3.0-11-gd83ba22", [{"R15B03", "ZetgdHj2bY2w37buulWVf3USOZs="}]}).
  
positive.code: 
  
  %% Load Config
  %% Pareses <plugindir>/priv/default.d/<pluginname.ini> and applies
  %% the contents to the config system.
  
  -spec load_config(string(), string()) -> ok.
  load_config(Name, Version) ->
      lists:foreach(
        fun load_config_file/1,
        filelib:wildcard(
          filename:join(
            [plugin_dir(), get_file_slug(Name, Version),
             "priv", "default.d", "*.ini"]))).
  
  -spec load_config_file(string()) -> ok.
  load_config_file(File) ->
      {ok, Config} = couch_config:parse_ini_file(File),
      lists:foreach(fun set_config/1, Config).
  
  -spec set_config({{string(), string()}, string()}) -> ok.
  set_config({{Section, Key}, Value}) ->
      ok = couch_config:set(Section, Key, Value, false).
  
  %% * * *
  
  
  
  -spec add_code_path(string(), string()) -> ok | {error, bad_directory}.
  add_code_path(Name, Version) ->
  
negative.code:       Else
    end.
  
  -spec del_code_path(string(), string()) -> ok | {error, atom()}.
  del_code_path(Name, Version) ->
    PluginPath = plugin_dir() ++ "/" ++ get_file_slug(Name, Version) ++ "/ebin",
    case code:del_path(PluginPath) of
      true -> ok;
      _Else ->
        ?LOG_DEBUG("Failed to delete PluginPath: '~s', ignoring", [PluginPath]),
        ok
    end.
  
  %% * * *
  
  
  %% Load Plugin
  %% This uses `appliction:load(<plugnname>)` to load the plugin
  %% and `appliction:unload(<plugnname>)` to unload the plugin.
  
  -spec load_plugin(string()) -> ok | {error, atom()}.
  load_plugin(NameList) ->
    Name = list_to_atom(NameList),
    application:load(Name).
  
  -spec unload_plugin(string()) -> ok | {error, atom()}.
  unload_plugin(NameList) ->
    Name = list_to_atom(NameList),
    application:unload(Name).
  
  %% * * *
  
  
  -spec untargz(string()) -> {ok, string()} | {error, string()}.
  