From d9ee362537a34473b32ad3b4a1d7feb56a6b6811 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Sun, 6 Sep 2020 15:08:20 +0200 Subject: Fix weird indentation issue of yaml --- scripts/build | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'scripts') 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(/(?[^@:]+)(?:@(?[^:]+))?(?::(?.*))?/) - [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 -- cgit v1.2.3