 defmodule Mix.Tasks.Archive.Install do
   use Mix.Task
-
-  import Mix.Generator, only: [create_file: 2]
 
   @shortdoc "Install an archive locally"
 

                   "Are you sure you want to replace them?")
  end

  defp previous_versions(src) do
    app = src
          |> Mix.Archive.dir


    if opts[:force] || should_install?(src, previous) do
      remove_previous_versions(previous)

      dest = Mix.Local.archives_path()
      archive = Path.join(dest, basename(src))
      check_file_exists(archive)

      File.mkdir_p!(dest)
      File.write!(archive, Mix.Utils.read_path!(src, opts))
      Mix.shell.info [:green, "* creating ", :reset, Path.relative_to_cwd(archive)]

      true = Code.append_path(Mix.Archive.ebin(archive))
    else
      false
