mirror of
https://github.com/mistydemeo/tigerbrew.git
synced 2026-12-02 13:39:47 -05:00
create: use resource for checksum detection
This commit is contained in:
1 parent
d57e987be3
commit
8edeef83b7
1 file changed
+4
-3
@@ -102,10 +102,11 @@ class FormulaCreator
|
||||
puts "You'll need to add an explicit 'version' to the formula."
|
||||
end
|
||||
|
||||
# XXX: why is "and version" here?
|
||||
unless ARGV.include? "--no-fetch" and version
|
||||
spec = SoftwareSpec.new(url, version)
|
||||
strategy = spec.download_strategy
|
||||
@sha1 = strategy.new(name, spec).fetch.sha1 if strategy == CurlDownloadStrategy
|
||||
r = Resource.new(:default, url, version)
|
||||
r.owner = self
|
||||
@sha1 = r.fetch.sha1 if r.download_strategy == CurlDownloadStrategy
|
||||
end
|
||||
|
||||
path.write ERB.new(template, nil, '>').result(binding)
|
||||
|
||||
Reference in new issue
Block a user