summaryrefslogtreecommitdiff
path: root/lib/download.rb
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2023-08-17 22:07:09 +0200
committerEugen Wissner <belka@caraus.de>2023-08-17 22:07:09 +0200
commitfd649b66f57123aad95861e636299a2d0a5ca6f7 (patch)
treefcdfa433ed9d80d0b00ddccbdc56955ca4b7cd1a /lib/download.rb
parent6b15ccd0f53c7ffd57820fb15664ecadee74392a (diff)
downloadslackbuilder-fd649b66f57123aad95861e636299a2d0a5ca6f7.tar.gz
Implement remote file check as Haskell command
Diffstat (limited to 'lib/download.rb')
-rw-r--r--lib/download.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/download.rb b/lib/download.rb
index 6d4a307..1d48e68 100644
--- a/lib/download.rb
+++ b/lib/download.rb
@@ -48,13 +48,7 @@ module SlackBuilder
end
def self.remote_file_exists?(url)
- uri = URI hosted_sources(url)
-
- request = Net::HTTP.new uri.host, uri.port
- request.use_ssl = true
- response = request.request_head uri.path
-
- response.code.to_i == 200
+ `./bin/slackbuilder exists #{url}`.strip == 'True'
end
def self.download_and_deploy(uri, tarball)