aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorilovezfs2018-01-24 03:51:23 -0800
committerilovezfs2018-01-24 03:51:23 -0800
commit4a1a8b86ac094621a50eff1526b53f62758ad1be (patch)
tree6859eb4f5ea5aaa5c0abf24b49388bf5cda42c89 /Library
parent60a30e966b7cece5bd4823dae3fb981ab85106ea (diff)
downloadbrew-4a1a8b86ac094621a50eff1526b53f62758ad1be.tar.bz2
bump-formula-pr: use "resource" not "rsrc"
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/dev-cmd/bump-formula-pr.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb
index 59dfc121d..0094ae4f8 100644
--- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb
+++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb
@@ -184,23 +184,23 @@ module Homebrew
elsif !new_url
odie "#{formula}: no --url= argument specified!"
else
- rsrc_url = if requested_spec != :devel && new_url =~ /.*ftpmirror.gnu.*/
+ resource_url = if requested_spec != :devel && new_url =~ /.*ftpmirror.gnu.*/
new_mirror = new_url.sub "ftpmirror.gnu.org", "ftp.gnu.org/gnu"
new_mirror
else
new_url
end
- rsrc = Resource.new { @url = rsrc_url }
- rsrc.download_strategy = CurlDownloadStrategy
- rsrc.owner = Resource.new(formula.name)
- rsrc.version = forced_version if forced_version
- odie "No --version= argument specified!" unless rsrc.version
- rsrc_path = rsrc.fetch
+ resource = Resource.new { @url = resource_url }
+ resource.download_strategy = CurlDownloadStrategy
+ resource.owner = Resource.new(formula.name)
+ resource.version = forced_version if forced_version
+ odie "No --version= argument specified!" unless resource.version
+ resource_path = resource.fetch
gnu_tar_gtar_path = HOMEBREW_PREFIX/"opt/gnu-tar/bin/gtar"
gnu_tar_gtar = gnu_tar_gtar_path if gnu_tar_gtar_path.executable?
tar = which("gtar") || gnu_tar_gtar || which("tar")
- if Utils.popen_read(tar, "-tf", rsrc_path) =~ %r{/.*\.}
- new_hash = rsrc_path.sha256
+ if Utils.popen_read(tar, "-tf", resource_path) =~ %r{/.*\.}
+ new_hash = resource_path.sha256
elsif new_url.include? ".tar"
odie "#{formula}: no --url=/--#{hash_type}= arguments specified!"
end