aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/resource.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/Library/Homebrew/resource.rb b/Library/Homebrew/resource.rb
index 8fd9dc7b3..8b3ce4c33 100644
--- a/Library/Homebrew/resource.rb
+++ b/Library/Homebrew/resource.rb
@@ -43,12 +43,16 @@ class Resource
downloader.cached_location
end
- # Download the resource
+ # Fetch, verify, and unpack the resource
+ def stage(target=nil, &block)
+ verify_download_integrity(fetch)
+ unpack(target, &block)
+ end
+
# If a target is given, unpack there; else unpack to a temp folder
# If block is given, yield to that block
# A target or a block must be given, but not both
- def stage(target=nil)
- verify_download_integrity(fetch)
+ def unpack(target=nil)
mktemp(download_name) do
downloader.stage
if block_given?