Browse Source

Don't warn repeatedly about an existing LLVM dir

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
ci-artifacts
Dimitar Dobrev 5 years ago
parent
commit
1c7cfaeaaf
  1. 40
      build/llvm/LLVM.lua

40
build/llvm/LLVM.lua

@ -187,34 +187,32 @@ function download_llvm()
-- check if we already have the file downloaded -- check if we already have the file downloaded
if os.isfile(archive) then if os.isfile(archive) then
print("Archive " .. archive .. " already exists.") print("Archive " .. archive .. " already exists.")
return
elseif os.isdir(pkg_name) then elseif os.isdir(pkg_name) then
print("Directory " .. pkg_name .. " already exists.") print("Directory " .. pkg_name .. " already exists.")
else return
msg, code = download(base .. archive, archive, true) end
if msg ~= "OK" then msg, code = download(base .. archive, archive, true)
if code == 404 then
print("Error: " .. archive .. " is unavailable.") if msg ~= "OK" then
print("Please create your own LLVM package by executing the following commands:") if code == 404 then
print("./build.sh clone_llvm") print("Error: " .. archive .. " is unavailable.")
print("./build.sh build_llvm") print("Please create your own LLVM package by executing the following commands:")
print("./build.sh package_llvm") print("./build.sh clone_llvm")
os.exit(1) print("./build.sh build_llvm")
end print("./build.sh package_llvm")
os.exit(1)
error(msg)
end end
error(msg)
end end
-- extract the package -- extract the package
if os.isdir(pkg_name) then if use_7zip then
print("Directory " .. pkg_name .. " already exists.") extract_7z(archive, pkg_name)
else else
if use_7zip then extract_tar_xz(archive, pkg_name)
extract_7z(archive, pkg_name)
else
extract_tar_xz(archive, pkg_name)
end
end end
end end

Loading…
Cancel
Save