-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cf2c099
commit 36ce20a
Showing
8 changed files
with
66 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
require 'tmpdir' | ||
|
||
class Cask::Container::Cab < Cask::Container::Base | ||
def self.me?(criteria) | ||
(criteria.file.include? 'application/octet-stream;' or | ||
criteria.file.include? 'application/vnd.ms-cab-compressed;') and | ||
criteria.cabextract.include? 'All done, no errors' | ||
end | ||
|
||
def extract | ||
cabextract = HOMEBREW_PREFIX.join('bin/cabextract') | ||
if ! Pathname.new(cabextract).exist? | ||
raise "Expected to find cabextract executable. Cask #{@cask} must add 'depends_on_formula'" | ||
end | ||
Dir.mktmpdir do |staging_dir| | ||
@command.run!(cabextract, :args => ['-d', staging_dir, '--', @path]) | ||
@command.run!('/usr/bin/ditto', :args => ['--', staging_dir, @cask.destination_path]) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class CabContainer < TestCask | ||
url TestHelper.local_binary('cabcontainer.cab') | ||
homepage 'http://example.com/cab-container' | ||
version '1.2.3' | ||
sha1 '85bfbcfc8887a995ae0e724796a0c242341b3071' | ||
depends_on_formula 'cabextract' | ||
link 'cabcontainer/Application.app' | ||
end |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters