[bin] Fixup binary-finder for lab

This commit is contained in:
Sebastian Schulze 2019-01-14 16:58:23 +01:00
parent 459675937b
commit 601d0cda3f
Signed by: bascht
GPG Key ID: 5BCB1D3B4D38A35A
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ binaries.each do |binary, download|
system("tar xvf #{downloaded_file} > /dev/null") if downloaded_file.end_with?(".gz")
system("unzip #{downloaded_file} > /dev/null") if downloaded_file.end_with?(".zip")
FileUtils.mv(File.realpath(Dir.glob("#{binary}-*/#{binary}*").first), target)
FileUtils.mv(File.realpath([Dir.glob("#{binary}-*/#{binary}*"), Dir.glob("**/**/#{binary}*"), binary].flatten.first), target)
end
File.chmod(0755, target)
end