Skip to content

Auto download/update layers specified in g:layers #6

@cweagans

Description

@cweagans

We shouldn't need to download layers separately to set up vigor. Maybe something to this effect:

	" Given a layer name, download or update the local copy.
	function! DownloadUpdateLayer(name)
		if !isdirectory(g:vigor_home . "/layers/" . a:name)
			if a:name =~ "/"
				" If the name has a slash, then we'll download the Github repo specified.
				execute "silent !git clone https://github.com/" . a:name . ".git " . g:vigor_home . "/layers/" . a:name
			else
				" Otherwise, we're going to treat it like an official layer in the vim-vigor namespace.
				execute "silent !git clone https://github.com/vim-vigor/" . a:name . ".git " . g:vigor_home . "/layers/" . a:name
			endif
		else
			if !exists("no_vigor_autoupdate")
				execute "silent !git pull -C " . g:vigor_home . "/layers/" . a:name
			endif
		endif
	endfunction

And then iterate over g:layers in the bootstrap function. Not sure what implications this has for plugin installation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions