Exemplo n.º 1
0
def clone_plugin(plugin):
    """Clone the given plugin into our plugin directory."""
    dirname = os.path.join(plugin_cache_dir(), os.path.basename(plugin))
    print('Cloning %s -> %s' % (plugin, dirname))
    if os.path.exists(dirname):
        print('Skip cloning of %s. Already there.' % plugin)
        return
    create_directory(dirname)
    subprocess.call(['git', 'clone', '--recursive',
                     '--depth', '1', 'https://github.com/%s' % plugin, dirname])

    if plugin == 'Valloric/YouCompleteMe':
        # CLUTCH: this plugin needs something extra.
        subprocess.call(os.path.join(dirname, './install.sh'), cwd=dirname)
Exemplo n.º 2
0
def clone_plugin(plugin):
    """Clone the given plugin into our plugin directory."""
    dirname = os.path.join(plugin_cache_dir(), os.path.basename(plugin))
    print('Cloning %s -> %s' % (plugin, dirname))
    if os.path.exists(dirname):
        print('Skip cloning of %s. Already there.' % plugin)
        return
    create_directory(dirname)
    subprocess.call(['git', 'clone', '--recursive',
                     '--depth', '1', 'https://github.com/%s' % plugin, dirname])

    if plugin == 'Valloric/YouCompleteMe':
        # CLUTCH: this plugin needs something extra.
        subprocess.call(os.path.join(dirname, './install.sh'), cwd=dirname)
Exemplo n.º 3
0
def clone_plugin(plugin):
    """Clone the given plugin into our plugin directory."""
    dirname = os.path.join(plugin_cache_dir(), os.path.basename(plugin))
    print("Cloning %s -> %s" % (plugin, dirname))
    if os.path.exists(dirname):
        print("Skip cloning of %s. Already there." % plugin)
        return
    create_directory(dirname)
    subprocess.call([
        "git",
        "clone",
        "--recursive",
        "--depth",
        "1",
        "https://github.com/%s" % plugin,
        dirname,
    ])

    if plugin == "Valloric/YouCompleteMe":
        # CLUTCH: this plugin needs something extra.
        subprocess.call(os.path.join(dirname, "./install.sh"), cwd=dirname)
Exemplo n.º 4
0
 def _link_file(self, source, relative_destination):
     """Creates a link from 'source' to the 'relative_destination' in our
     temp dir."""
     absdir = self.name_temp(relative_destination)
     create_directory(absdir)
     os.symlink(source, os.path.join(absdir, os.path.basename(source)))
Exemplo n.º 5
0
 def _link_file(self, source, relative_destination):
     """Creates a link from 'source' to the 'relative_destination' in our
     temp dir."""
     absdir = self.name_temp(relative_destination)
     create_directory(absdir)
     os.symlink(source, os.path.join(absdir, os.path.basename(source)))