diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-09-12 14:54:55 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-09-12 14:54:55 +0200 |
commit | c842cbcb59ba734d803dfe149ae6246d9056539d (patch) | |
tree | f67f303b02ff254d1f9e3a4cf44321e2683384cd /scripts/build | |
parent | 314621a395041a5f93aef16b8c4a65a161a57eb1 (diff) | |
download | vim-polyglot-c842cbcb59ba734d803dfe149ae6246d9056539d.tar.gz vim-polyglot-c842cbcb59ba734d803dfe149ae6246d9056539d.zip |
Update
Diffstat (limited to 'scripts/build')
-rwxr-xr-x | scripts/build | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/build b/scripts/build index fabec033..352ff8da 100755 --- a/scripts/build +++ b/scripts/build @@ -135,8 +135,15 @@ def transform_patterns(heuristics) end def load_languages - url = "#{BASE_URL}/lib/linguist/languages.yml" - data = URI.open(url) { |io| YAML.load(io.read) } + file = 'tmp/languages.yml' + + unless File.exist?(file) + url = "#{BASE_URL}/lib/linguist/languages.yml" + data = URI.open(url) { |io| io.read } + File.write(file, data) + end + + YAML.load(File.read(file)) end def parse_remote(remote) |