@@ -187,34 +187,32 @@ function download_llvm()
187
187
-- check if we already have the file downloaded
188
188
if os .isfile (archive ) then
189
189
print (" Archive " .. archive .. " already exists." )
190
+ return
190
191
elseif os .isdir (pkg_name ) then
191
192
print (" Directory " .. pkg_name .. " already exists." )
192
- else
193
- msg , code = download (base .. archive , archive , true )
194
-
195
- if msg ~= " OK" then
196
- if code == 404 then
197
- print (" Error: " .. archive .. " is unavailable." )
198
- print (" Please create your own LLVM package by executing the following commands:" )
199
- print (" ./build.sh clone_llvm" )
200
- print (" ./build.sh build_llvm" )
201
- print (" ./build.sh package_llvm" )
202
- os.exit (1 )
203
- end
204
-
205
- error (msg )
193
+ return
194
+ end
195
+
196
+ msg , code = download (base .. archive , archive , true )
197
+
198
+ if msg ~= " OK" then
199
+ if code == 404 then
200
+ print (" Error: " .. archive .. " is unavailable." )
201
+ print (" Please create your own LLVM package by executing the following commands:" )
202
+ print (" ./build.sh clone_llvm" )
203
+ print (" ./build.sh build_llvm" )
204
+ print (" ./build.sh package_llvm" )
205
+ os.exit (1 )
206
206
end
207
+
208
+ error (msg )
207
209
end
208
210
209
211
-- extract the package
210
- if os . isdir ( pkg_name ) then
211
- print ( " Directory " .. pkg_name .. " already exists. " )
212
+ if use_7zip then
213
+ extract_7z ( archive , pkg_name )
212
214
else
213
- if use_7zip then
214
- extract_7z (archive , pkg_name )
215
- else
216
- extract_tar_xz (archive , pkg_name )
217
- end
215
+ extract_tar_xz (archive , pkg_name )
218
216
end
219
217
end
220
218
0 commit comments