Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use sha1 as the default checksum for new formulae
  • Loading branch information
adamv committed Jun 6, 2012
1 parent 665cb6b commit ff96f4c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Library/Homebrew/cmd/create.rb
Expand Up @@ -57,7 +57,7 @@ def __gets

class FormulaCreator
attr :url
attr :md5
attr :sha1
attr :name, true
attr :path, true
attr :mode, true
Expand Down Expand Up @@ -89,7 +89,7 @@ def generate

unless ARGV.include? "--no-fetch" and version
strategy = detect_download_strategy url
@md5 = strategy.new(url, name, version, nil).fetch.md5 if strategy == CurlDownloadStrategy
@sha1 = strategy.new(url, name, version, nil).fetch.sha1 if strategy == CurlDownloadStrategy
end

path.write ERB.new(template, nil, '>').result(binding)
Expand All @@ -104,7 +104,7 @@ def template; <<-EOS.undent
class #{Formula.class_s name} < Formula
homepage ''
url '#{url}'
md5 '#{md5}'
sha1 '#{sha1}'
<% if mode == :cmake %>
depends_on 'cmake' => :build
Expand Down

0 comments on commit ff96f4c

Please sign in to comment.