    def unpack_archive(file)
      case file
      when /\.zip$/
        unzip(file)
      when /\.tar\.gz$/
        io = ungzip(file)
        untar(io)
      else
        raise "Don't know how to unpack #{file}"
      end
    end