diff options
| author | Adam Stankiewicz <sheerun@sher.pl> | 2020-08-24 11:48:35 +0200 | 
|---|---|---|
| committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-08-24 11:48:35 +0200 | 
| commit | b2055afaa70dd35bccdb9deeeb5ebdefae25a026 (patch) | |
| tree | 4ee50a9fefa5a2366bb129d129a5884331abbc7b /scripts | |
| parent | 63a175357a139ebbecf724b5d8229d383a08afef (diff) | |
| download | vim-polyglot-b2055afaa70dd35bccdb9deeeb5ebdefae25a026.tar.gz vim-polyglot-b2055afaa70dd35bccdb9deeeb5ebdefae25a026.zip | |
Migrate only after dirs
Diffstat (limited to '')
| -rwxr-xr-x | scripts/build | 9 | 
1 files changed, 6 insertions, 3 deletions
| diff --git a/scripts/build b/scripts/build index a90f3e94..f1e1a596 100755 --- a/scripts/build +++ b/scripts/build @@ -5,6 +5,7 @@ require 'open3'  require 'yaml'  require 'fileutils'  require 'set' +require 'json'  Dir.chdir(File.dirname(__dir__)) @@ -15,8 +16,7 @@ BASE_URL = 'https://raw.githubusercontent.com/github/linguist/master'  DIRS = {    default: %w(syntax indent compiler autoload ftplugin ctags after/syntax after/indent after/ftplugin),    all: %w(syntax indent compiler autoload ftplugin after extras ctags), -  syntax: %w(syntax indent after/syntax after/indent), -  noafter: %w(syntax compiler indent autoload ftplugin) +  syntax: %w(syntax indent after/syntax after/indent)  }  def parallel(*procs) @@ -156,7 +156,10 @@ def extract      dir = "tmp/" + repo.split('/')[1]      subdirs = []      dirs = DIRS.fetch(package.fetch("dirs", "default").to_sym) -    dirs -= package.fetch("ignored_dirs", []) +    ignored_dirs = package.fetch("ignored_dirs", []) +    if ignored_dirs.size > 0 +      dirs = dirs.reject { |d| ignored_dirs.any? { |id| d.start_with?(id) } } +    end      dirs |= package.fetch("extra_dirs", [])      for subdir in dirs        subtree = "#{dir}/#{path ? path + "/" : ""}" | 
