gcc-latest: Added a patch for immutable structs

This commit is contained in:
2023-03-22 10:58:37 +01:00
parent 6b634b4055
commit c7a527e010
4 changed files with 104 additions and 9 deletions

View File

@ -43,11 +43,11 @@ module SlackBuilder
checksum
end
def hosted_sources(absolute_url)
def self.hosted_sources(absolute_url)
CONFIG[:download_url] + absolute_url
end
def remote_file_exists?(url)
def self.remote_file_exists?(url)
uri = URI hosted_sources(url)
request = Net::HTTP.new uri.host, uri.port
@ -60,7 +60,7 @@ module SlackBuilder
def self.download_and_deploy(uri, tarball)
remote_path = tarball[tarball.index('/')..]
if SlackBuilder.remote_file_exists?(remote_path)
if remote_file_exists?(remote_path)
uri = URI hosted_sources(remote_path)
return download(uri, "slackbuilds/#{tarball}").hexdigest
end