summaryrefslogtreecommitdiffstats
path: root/scripts/build
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-09-06 15:08:20 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-09-06 15:08:20 +0200
commitd9ee362537a34473b32ad3b4a1d7feb56a6b6811 (patch)
tree5d0cf440bb0893f679f21963e79f866ad3a73d35 /scripts/build
parent57badea2dc9aff361d528aeeeb22ac2e85da1435 (diff)
downloadvim-polyglot-d9ee362537a34473b32ad3b4a1d7feb56a6b6811.tar.gz
vim-polyglot-d9ee362537a34473b32ad3b4a1d7feb56a6b6811.zip
Fix weird indentation issue of yaml
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build9
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/build b/scripts/build
index 79a1cfe7..c9a12743 100755
--- a/scripts/build
+++ b/scripts/build
@@ -155,7 +155,8 @@ end
def parse_remote(remote)
match = remote.match(/(?<repo>[^@:]+)(?:@(?<branch>[^:]+))?(?::(?<path>.*))?/)
- [match[:repo], match[:branch] || "master", match[:path]]
+ dir = "tmp/" + match[:repo] + (match[:branch] ? "-#{match[:branch]}" : "")
+ [match[:repo], match[:branch] || "master", match[:path], dir]
end
def copy_file(package, src, dest)
@@ -179,8 +180,7 @@ def download(packages)
packages.map { |p| p["remote"] or raise "No remote for: " + p["name"] }.uniq.each_slice(20) do |remotes|
remotes.map do |remote|
Thread.new do
- repo, branch, path = parse_remote(remote)
- dir = "tmp/" + repo
+ repo, branch, path, dir = parse_remote(remote)
unless File.exist?(dir)
FileUtils.mkdir_p(dir)
url = "https://codeload.github.com/#{repo}/tar.gz/#{branch}"
@@ -321,8 +321,7 @@ def extract(packages)
output = []
packages.map do |package|
- repo, branch, path = parse_remote(package["remote"])
- dir = "tmp/" + repo
+ repo, branch, path, dir = parse_remote(package["remote"])
dirs = package.fetch("dirs", default_dirs)
ignored_dirs = package.fetch("ignored_dirs", [])
if ignored_dirs.size > 0