Fixes file://.
parent
2eb87bdf25
commit
ae43eda669
|
@ -210,16 +210,20 @@ class Package::Recipe
|
||||||
|
|
||||||
def download
|
def download
|
||||||
sources.each do |url|
|
sources.each do |url|
|
||||||
next if url.scheme == "file"
|
|
||||||
|
|
||||||
filename = @context.sources_directory + "/" + url.filename
|
filename = @context.sources_directory + "/" + url.filename
|
||||||
|
|
||||||
unless File.exists? filename
|
unless File.exists? filename
|
||||||
@context.info "Downloading '#{url.filename}'"
|
if url.scheme == "file"
|
||||||
|
@context.info "Copying '#{url.filename}'"
|
||||||
|
|
||||||
status = @context.run @context.sources_directory, "wget", [ url.to_s, "-O", filename ]
|
FileUtils.cp "#{recipe_directory}/#{url.filename}", filename
|
||||||
|
else
|
||||||
|
@context.info "Downloading '#{url.filename}'"
|
||||||
|
|
||||||
raise DownloadError.new self, url unless status.success?
|
status = @context.run @context.sources_directory, "wget", [ url.to_s, "-O", filename ]
|
||||||
|
|
||||||
|
raise DownloadError.new self, url unless status.success?
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Reference in New Issue