diff options
| author | Xu Cheng | 2015-06-06 14:02:30 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-06-07 23:51:15 +0800 |
| commit | 97fff0cd50b5a5c7dd082981de448d2fece7182c (patch) | |
| tree | 55725881d66d0816e9174e3b96b2d014ee97f5e5 /Library | |
| parent | 31ca2831f3a78fa3f4e2a0cb4e7133c4b83460f9 (diff) | |
| download | brew-97fff0cd50b5a5c7dd082981de448d2fece7182c.tar.bz2 | |
bottles: new method bottle_receipt_path
Thanks @sjackman's advice
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/bottles.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/bottles.rb b/Library/Homebrew/bottles.rb index e49872f75..5a9b0aa22 100644 --- a/Library/Homebrew/bottles.rb +++ b/Library/Homebrew/bottles.rb @@ -38,8 +38,12 @@ def bottle_tag end end +def bottle_receipt_path bottle_file + Utils.popen_read("tar", "-tzf", bottle_file, "*/*/INSTALL_RECEIPT.json").chomp +end + def bottle_resolve_formula_names bottle_file - receipt_file_path = Utils.popen_read("tar", "-tzf", bottle_file, "*/*/INSTALL_RECEIPT.json").chomp + receipt_file_path = bottle_receipt_path bottle_file receipt_file = Utils.popen_read("tar", "-xOzf", bottle_file, receipt_file_path) name = receipt_file_path.split("/").first tap = Tab.from_file_content(receipt_file, "#{bottle_file}/#{receipt_file_path}").tap |
