mirror of
https://github.com/amix/vimrc
synced 2025-02-28 14:12:51 +08:00
Use cache folder for sources_non_forked
This commit is contained in:
parent
f8be2919e7
commit
06826a2b74
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,5 +1,5 @@
|
||||
temp_dirs/undodir/*
|
||||
sources_non_forked/*
|
||||
sources_non_forked_cache/*
|
||||
temp_dirs/yankring_history_v2.txt
|
||||
sources_forked/yankring/doc/tags
|
||||
my_plugins/
|
||||
|
@ -11,6 +11,7 @@ import shutil
|
||||
import tempfile
|
||||
import urllib.request
|
||||
import zipfile
|
||||
from distutils.dir_util import copy_tree
|
||||
from io import BytesIO
|
||||
from os import path
|
||||
|
||||
@ -68,8 +69,8 @@ jedi-vim https://github.com/davidhalter/jedi-vim
|
||||
|
||||
GITHUB_ZIP = "%s/archive/master.zip"
|
||||
|
||||
SOURCE_DIR = path.join(path.dirname(__file__), "sources_non_forked")
|
||||
|
||||
FALLBACK_SOURCE_DIR = path.join(path.dirname(__file__), "sources_non_forked")
|
||||
SOURCE_DIR = path.join(path.dirname(__file__), "sources_non_forked_cache")
|
||||
|
||||
def download_extract_replace(plugin_name, zip_path, temp_dir, source_dir):
|
||||
# Download and extract file in temp dir
|
||||
@ -105,6 +106,9 @@ def update(plugin):
|
||||
if __name__ == "__main__":
|
||||
temp_directory = tempfile.mkdtemp()
|
||||
|
||||
if not path.isdir(SOURCE_DIR):
|
||||
copy_tree(FALLBACK_SOURCE_DIR, SOURCE_DIR)
|
||||
|
||||
try:
|
||||
if futures:
|
||||
with futures.ThreadPoolExecutor(16) as executor:
|
||||
|
@ -10,7 +10,7 @@
|
||||
""""""""""""""""""""""""""""""
|
||||
let s:vim_runtime = expand('<sfile>:p:h')."/.."
|
||||
call pathogen#infect(s:vim_runtime.'/sources_forked/{}')
|
||||
call pathogen#infect(s:vim_runtime.'/sources_non_forked/{}')
|
||||
call pathogen#infect(s:vim_runtime.'/sources_non_forked_cache/{}')
|
||||
call pathogen#infect(s:vim_runtime.'/my_plugins/{}')
|
||||
call pathogen#helptags()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user