summaryrefslogtreecommitdiffstats
path: root/scripts/build
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-12-29 23:40:05 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2020-12-29 23:40:05 +0100
commit1150adc4db99fc4f88f0a5ebebe2f9033784209c (patch)
tree35aa09f7e5c253e06e1d7b95228e5e418b65e640 /scripts/build
parent47dcae9131ac32cabf92f49093f044732a412450 (diff)
downloadvim-polyglot-1150adc4db99fc4f88f0a5ebebe2f9033784209c.tar.gz
vim-polyglot-1150adc4db99fc4f88f0a5ebebe2f9033784209c.zip
Fix detecting conf filetype, closes #641
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/build b/scripts/build
index 3933a87e..758b3aff 100755
--- a/scripts/build
+++ b/scripts/build
@@ -113,9 +113,9 @@ def sort_packages(packages)
each_child = lambda { |n, &b|
[
implicit_dependencies[n] || [],
- packages[n]["dependencies"] || [],
- packages[n]["after"] || []
- ].flatten.each(&b)
+ packages[n] ? packages[n]["dependencies"] || [] : [],
+ packages[n] ? packages[n]["after"] || [] : []
+ ].flatten.each { |e| b.call(e) if packages[e] }
}
TSort.tsort(each_node, each_child).map { |a| packages[a] }
@@ -248,11 +248,11 @@ def load_languages
end
def load_packages
- YAML.load_stream(File.read('packages.yaml'))
+ YAML.load_stream(File.read('packages.yaml')) || []
end
def load_heuristics
- YAML.load_stream(File.read('heuristics.yaml'))
+ YAML.load_stream(File.read('heuristics.yaml')) || []
end
def parse_remote(remote)
@@ -486,6 +486,7 @@ def extract(packages)
)
FileUtils.rm_rf(all_dirs)
+ Dir.mkdir('extras') unless File.exists?('extras')
for dir in Dir.glob("*", base: "autoload")
if dir != "polyglot"