Coder Social home page Coder Social logo

homebrew / homebrew-cask Goto Github PK

View Code? Open in Web Editor NEW
20.5K 20.5K 10.5K 378.06 MB

šŸ» A CLI workflow for the administration of macOS applications distributed as binaries

Home Page: https://brew.sh

License: BSD 2-Clause "Simplified" License

Ruby 99.06% Shell 0.84% Python 0.10%
cask hacktoberfest homebrew

homebrew-cask's Introduction

Homebrew Cask

ā€œTo install, drag this iconā€¦ā€ no more!

Homebrew Cask extends Homebrew and brings its elegance, simplicity, and speed to the installation and management of GUI macOS applications such as Visual Studio Code and Google Chrome.

We do this by providing a friendly CLI workflow for the administration of macOS applications distributed as binaries.

Join us on GitHub discussions

Letā€™s try it!

To start using Homebrew Cask, you just need Homebrew installed.

Installing and uninstalling Alfred (animated gif)

Slower, now:

$ brew install alfred
==> Downloading https://cachefly.alfredapp.com/Alfred_4.2.1_1187.dmg
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'alfred'.
==> Installing Cask alfred
==> Moving App 'Alfred 4.app' to '/Applications/Alfred 4.app'.
šŸŗ  alfred was successfully installed!

And there we have it. An application installed with one quick command: no clicking, no dragging, no dropping.

Learn More

  • Find basic documentation on using Homebrew Cask in USAGE.md.
  • Want to contribute a cask? Awesome! See CONTRIBUTING.md.
  • More project-related details and discussion are available in the documentation.

Reporting Bugs

If you ignore this guide, your issue may be closed without review

Before reporting a bug, run brew update-reset && brew update and try your command again. This is a fix-all that will reset the state of all your taps, ensuring the problem isnā€™t an outdated setup on your side.

If your issue persists, search for it before opening a new one. If you find an open issue and have any new information, add it in a comment. If you find a closed issue, try the solutions there.

If the issue is still not solved, see the guides for common problems:

Requests

Questions? Wanna chat?

Weā€™re really rather friendly! Here are the best places to talk about the project:

License

Code is under the BSD 2 Clause (NetBSD) license.

homebrew-cask's People

Contributors

adithyasunil26 avatar amorymeltzer avatar bevanjkay avatar brewtestbot avatar chenrui333 avatar cho-m avatar colindunn avatar commitay avatar core-code avatar fanquake avatar giannitm avatar gobinathm avatar gtmgianni avatar jawshooah avatar krehel avatar miccal avatar mikemcquaid avatar nanoxd avatar neutric avatar p-linnane avatar porkepix avatar ran-dall avatar razvanazamfirei avatar reitermarkus avatar rolandwalker avatar singularitti avatar suschizu avatar victorpopkov avatar vitorgalvao avatar vulxan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebrew-cask's Issues

Error during installation: github.com/phinze/brew-cask.git/info/refs not found

As per README.md, I tried to install via:

brew install --HEAD https://gist.github.com/raw/2010774/8744c097cc9fdfda21fb4a07d140b23cfaf06b78/cbrew-cask.rb

And after asking me for my github username/password, the installer spit out this error:

fatal: https://github.com/phinze/brew-cask.git/info/refs not found: did you run git update-server-info on the server?

Clearly https://github.com/phinze/brew-cask.git should be https://github.com/phinze/homebrew-cask.git

I'm not sure how this problem was introduced, but the following workaround was sufficient for me:

brew install --HEAD https://raw.github.com/phinze/homebrew-cask/master/brew-cask.rb

Binary versions of apps already in homebrew

What do you guys think about having casks for binary versions of apps already available in homebrew? I'm thinking Macvim/Emacs(the .app part at least), but I'm sure there are others.

linkapps and multiple .app files

I used cask to install vlc. The dmg contains 2 .app files: VLC.app and Delete VLC Preferences.app.

In this case, I think cask should create a VLC folder and put all these .app files within it for easy management.

vagrant

What it would look like:

class Vagrant < Cask
  url 'http://files.vagrantup.com/packages/eb590aa3d936ac71cbf9c64cf207f148ddfc000a/Vagrant-1.0.3.dmg'  
  homepage 'http://vagrantup.com'
  version '1.0.3'
end

What needs to be done:

  • support for pkg installers (#14)

Type identifying problem

I tried creating a cask for the very latest version of the Textadept editor.

class Textadept < Cask
  url 'http://foicica.com/textadept/download/textadept_6.0_beta_3.osx.zip'
  homepage 'http://foicica.com/textadept/'
  version '6.0 beta 3'
end

It downloads, but then I get a

Error: uh oh, could not identify type of /Library/Caches/Homebrew/textadept-6.0 beta 3.zip

An older version without the beta downloads fine, see issue #33.

Can't install anything

Hello,

I just installed homebrew, installed nothing and searched for a way to install apps.
I found your fork so I tried it but couldn't install anything.
I moved away my macport installation to be sure.

Here is the log I obtain :

ā”Œā”€(lacoste@Cronos:s003)
ā””ā”€(%:15:16:%)ā”€ā”€ brew doctor
Your system is raring to brew.
ā”Œā”€(lacoste@Cronos:s003)
ā””ā”€(%:15:16:%)ā”€ā”€ brew cask install iterm2
Error: wrong number of arguments (4 for 2)
Please report this bug:
https://github.com/mxcl/homebrew/wiki/bug-fixing-checklist
/usr/local/Cellar/brew-cask/HEAD/rubylib/cask.rb:79:in initialize' /usr/local/Cellar/brew-cask/HEAD/rubylib/cask.rb:79:innew'
/usr/local/Cellar/brew-cask/HEAD/rubylib/cask.rb:79:in install' /usr/local/Cellar/brew-cask/HEAD/rubylib/cask/cli/install.rb:5:inrun'
/usr/local/Cellar/brew-cask/HEAD/rubylib/cask/cli.rb:17:in process' /usr/local/bin/brew-cask.rb:6 /usr/local/bin/brew:44:inrequire'
/usr/local/bin/brew:44:in `require?'
/usr/local/bin/brew:77

Any idea of what is wrong ?

Anyway thanks for your nice job.

XL.

PS: Same with utorrent :

brew cask install utorrent
Error: no such file to load -- /usr/local/Library/Casks/utorrent
Please report this bug:
https://github.com/mxcl/homebrew/wiki/bug-fixing-checklist
/usr/local/Cellar/brew-cask/HEAD/rubylib/cask.rb:46:in require' /usr/local/Cellar/brew-cask/HEAD/rubylib/cask.rb:46:inload'
/usr/local/Cellar/brew-cask/HEAD/rubylib/cask/cli/install.rb:4:in run' /usr/local/Cellar/brew-cask/HEAD/rubylib/cask/cli.rb:17:inprocess'
/usr/local/bin/brew-cask.rb:6
/usr/local/bin/brew:44:in require' /usr/local/bin/brew:44:inrequire?'
/usr/local/bin/brew:77

CamelCasing cask class gives uninitialized constant?

My commits so far haven't used proper CamelCase for the app name because when do I do, I get an uninitialized constant error.

For example:

class Rubymine < Cask

works when I copy the rb and brew cask install it to test, but

class RubyMine < Cask

gives me
uninitialized constant Cask::Rubymine
when I try to brew cask install

`brew cask uninstall` should remove symlinks

Just thinking that brew cask uninstall blah runs should probably clean up after themselves by removing the symlinks created with brew cask linkapps. Just wanted to create a stub issue for now

Issues installing DMG based casks in v0.5.2

Reported by @quanganhdo in #103

Invoking brew cask install calibre downloads the file correctly, but chokes with this error:

Error: undefined method new' for nil:NilClass
Please report this bug:
https://github.com/mxcl/homebrew/wiki/troubleshooting
/usr/local/Cellar/brew-cask/0.5.1/rubylib/plist/parser.rb:44:intag_start'
/usr/local/Cellar/brew-cask/0.5.1/rubylib/plist/parser.rb:95:in parse'
/usr/local/Cellar/brew-cask/0.5.1/rubylib/plist/parser.rb:28:inparse_xml'
/usr/local/Cellar/brew-cask/0.5.1/rubylib/cask/installer.rb:28:in _with_extracted_mountpoints'
/usr/local/Cellar/brew-cask/0.5.1/rubylib/cask/installer.rb:26:inopen'
/usr/local/Cellar/brew-cask/0.5.1/rubylib/cask/installer.rb:26:in _with_extracted_mountpoints'
/usr/local/Cellar/brew-cask/0.5.1/rubylib/cask/installer.rb:10:ininstall'
/usr/local/Cellar/brew-cask/0.5.1/rubylib/cask/cli/install.rb:6:in run'
/usr/local/Cellar/brew-cask/0.5.1/rubylib/cask/cli/install.rb:3:ineach'
/usr/local/Cellar/brew-cask/0.5.1/rubylib/cask/cli/install.rb:3:in run'
/usr/local/Cellar/brew-cask/0.5.1/rubylib/cask/cli.rb:17:inprocess'
/usr/local/bin/brew-cask.rb:6
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire'
/usr/local/bin/brew:51:in `require?'
/usr/local/bin/brew:91

Taps for Casks

Currently, only merged-in casks can be installed, except if one edits the definitions straight from Library/Taps/phinze-cask/Casks, which is awkward. [Installing from URL (#6) would also add to the convenience.]

I've started thinking (and am thinking of starting to code it up) about using plain Taps to add to the collection:

Currently, the only place we look in is Taps/phinze-cask/Casks. An easy way to add support without too much trouble is to just have normal taps, and when there's a Casks directory within a tap, use that as well.

So Taps/passcod-example/*.rb are regular Formulae, while Taps/passcod-example/Casks/*.rb are tapped casks. Plus, brew update does the right thing, no work needed.

There are a few things left to be worked out though, notably: what happens in case of duplicates across taps?

Programmatically modify Alfred scope

You could have an option to programmatically edit the Alfred scope by doing the following:

defaults read com.alfredapp.Alfred scope.paths | grep -q /usr/local/Cellar || defaults write com.alfredapp.Alfred scope.paths -array-add "/usr/local/Cellar"

NB: I don't know how to make Alfred see this change without restarting Alfred.

Hook cask into homebrew commands?

(as follow up from #38)

if it is so close to homebrew, why a additional 'cask' command?
it would be better if it just extends the normal workflow

just now i need to know if i want to install something it is a normal homebrew formula or it is a cask formula.

i think it should hook into the homebrew commands and then i can access all (homebrew and cask) from homebrew * commands

Not linking casks makes brew doctor complain

Running brew doctor will yell at you about your casks since it thinks they're not linked.

What should we do about this?

  • Ask upstream to loosen requirements to prevent warnings?
  • Do something to pretend like we're linked?
  • Avoid the Cellar altogether?

dia

There was a discussion about the removal of Dia from homebrew on the ML. I think cask can help!

I think this should be simple - just need to figure out the dia-installer sourceforge link.

[Feature Request] brew cask info/open

While looking for a certain formula, another formula's name often catches my eye. brew info formula sometimes gives clues, but almost always I have to do info, then copy and paste the web address in order to find out what the app does.

So, I suggest:

  1. an brew cask info command that echos out the version/homepage
  2. and possibly "brew cask open formula" that runs "open $homepage"

Application not linking

I tried creating a cask for the Textadept editor:

class Textadept < Cask
  url 'http://foicica.com/textadept/download/textadept_5.4.osx.zip'
  homepage 'http://foicica.com/textadept/'
  version '5.4'
end

It downloads and unpacks apparently fine, however it is not linked when running
brew cask linkapps

This is what is created:

textadept
ā””ā”€ā”€ 5.4
    ā””ā”€ā”€ textadept_5.4.osx
        ā”œā”€ā”€ Textadept.app
        ā””ā”€ā”€ ta

Cellar location for apps

Running brew doctor I get a warning

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:

    caffeine
    github
    notational-velocity

Is Cellar the best place for cask apps?
What about name conflicts with homebrew cli tools?

Error installing brew-cask

I'm running into this error when installing on OS X 10.8.

$ brew --version
0.9.3
$ brew tap phinze/homebrew-cask
...
$ brew install brew-cask
Error: undefined method `local_bottle_path' for #<GitDownloadStrategy:0x1071864f8>
Please report this bug:
    https://github.com/mxcl/homebrew/wiki/troubleshooting
/usr/local/Library/Homebrew/bottles.rb:14:in `install_bottle?'
/usr/local/Library/Homebrew/formula_installer.rb:20:in `initialize'
/usr/local/Library/Homebrew/cmd/install.rb:82:in `new'
/usr/local/Library/Homebrew/cmd/install.rb:82:in `install_formulae'
/usr/local/Library/Homebrew/cmd/install.rb:80:in `each'
/usr/local/Library/Homebrew/cmd/install.rb:80:in `install_formulae'
/usr/local/Library/Homebrew/cmd/install.rb:25:in `install'
/usr/local/bin/brew:94:in `send'
/usr/local/bin/brew:94

It seems like this may be an issue with Homebrew. (I did a quick search of the homebrew source and, indeed, the method is not defined anywhere) So, let me know if I need to file this issue in the homebrew repo.

Cask exists on github, but not local

Is there a command to get the list of casks here:

/usr/local/Library/Taps/phinze-cask/

to update to the latest in your Github repo? I just tried installing cyberduck, but I guess it has been recently added, and is not on my local.

Error: uninitialized constant Cask::Actions

I got this problem after upgrading cask to 0.5.0:

$ brew cask

Error: uninitialized constant Cask::Actions
Please report this bug:
https://github.com/mxcl/homebrew/wiki/troubleshooting
/usr/local/Cellar/brew-cask/HEAD/rubylib/cask.rb:9
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire'
/usr/local/bin/brew-cask.rb:4
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire'
/usr/local/bin/brew:51:in `require?'
/usr/local/bin/brew:91

I tried to run the HEAD version but had the same issue. My machine is running ML 10.8.2, ruby 1.8.7 and homebrew 0.9.3

virtual-box

What it would look like:

class VirtualBox < Cask
  url 'http://dlc.sun.com.edgesuite.net/virtualbox/4.1.22/VirtualBox-4.1.22-80657-OSX.dmg'  
  homepage 'http://virtualbox.org'
  version '4.1.22'
end

What needs to be done:

  • support for pkg installers (#14)

Installation error

When I go to install brew-cask fresh it errors out on running git clone

I have tried removing /usr/bin/ or /usr/local/bin from my path to make sure there was only 1 accessible git installation.

I have also made sure to get the latest homebrew from github using: (from here)

=> git reset --hard origin/master
HEAD is now at 1e6e443 Add caveats class and use in brew info.
=> brew update
Already up-to-date.
=> brew doctor
Your system is raring to brew.
=> brew --version
0.9.3
=> git --version
git version 1.8.1
=> brew untap phinze/homebrew-cask
Untapped 1 formula
=> brew tap phinze/homebrew-cask
Cloning into '/usr/local/Library/Taps/phinze-cask'...
remote: Counting objects: 1451, done.
remote: Compressing objects: 100% (635/635), done.
remote: Total 1451 (delta 840), reused 1410 (delta 805)
Receiving objects: 100% (1451/1451), 4.54 MiB | 785 KiB/s, done.
Resolving deltas: 100% (840/840), done.
Tapped 1 formula
=> brew install brew-cask -v
==> Cloning https://github.com/phinze/homebrew-cask.git
git clone --no-checkout --depth 1 --branch v0.6.0 https://github.com/phinze/homebrew-cask.git /Library/Caches/Homebrew/brew-cask--git
Error: Failure while executing: git clone --no-checkout --depth 1 --branch v0.6.0 https://github.com/phinze/homebrew-cask.git /Library/Caches/Homebrew/brew-cask--git
=> brew --config
HOMEBREW_VERSION: 0.9.3
HEAD: 1e6e443ba12bb0bdd0ba8d99c2bdf7130e83f5a9
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: dual-core 64-bit penryn
OS X: 10.8.2-x86_64
Xcode: 4.5.2
CLT: 4.5.0.0.1.1249367152
GCC-4.2: build 5666
LLVM-GCC: build 2336
Clang: 4.1 build 421
X11: 2.7.4 => /opt/X11
System Ruby: 1.8.7-358
Perl: /usr/local/perl/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /Users/ksmiley/.rbenv/shims/ruby

Any ideas?

Ability to specify "linkables" in a Cask

I often find when running linkapps that I end up with a bunch of cruft in /Applications - stuff like Uninstall Foo.app and crash_reporter.app.

I'm thinking if there was a way to specify which apps are supposed to be linked that would allow us to clean that up.

Just have to come up with some decent syntax for this.

Here's a first cut to start the conversation

class Steam < Cask
  url '...'
  # ...

  app 'Steam.app'
end

And specifying multiple lines is additive? I welcome thoughts on the method name, not sure I'm sold on this one yet.

Error: no such file to load -- /Casks/Applications.rb

After successfully installing everything I'm running into a new error when I try to run different tasks through brew cask for example brew cask install

=> brew tap phinze/homebrew-cask
Cloning into '/usr/local/Library/Taps/phinze-cask'...
remote: Counting objects: 1451, done.
remote: Compressing objects: 100% (635/635), done.
remote: Total 1451 (delta 840), reused 1410 (delta 805)
Receiving objects: 100% (1451/1451), 4.54 MiB | 1.15 MiB/s, done.
Resolving deltas: 100% (840/840), done.
Tapped 1 formula
=> brew install brew-cask
==> Cloning https://github.com/phinze/homebrew-cask.git
Updating /Library/Caches/Homebrew/brew-cask--git
==> Checking out tag v0.6.0
/usr/local/Cellar/brew-cask/0.6.0: 134 files, 540K, built in 2 seconds
=> brew doctor
Your system is raring to brew.
=> brew cask search
=> brew cask install
Error: no such file to load -- /Casks/Applications.rb
Please report this bug:
    https://github.com/mxcl/homebrew/wiki/troubleshooting
/usr/local/Cellar/brew-cask/0.6.0/rubylib/cask.rb:46:in `require'
/usr/local/Cellar/brew-cask/0.6.0/rubylib/cask.rb:46:in `load'
/usr/local/Cellar/brew-cask/0.6.0/rubylib/cask/cli/install.rb:5:in `run'
/usr/local/Cellar/brew-cask/0.6.0/rubylib/cask/cli/install.rb:3:in `each'
/usr/local/Cellar/brew-cask/0.6.0/rubylib/cask/cli/install.rb:3:in `run'
/usr/local/Cellar/brew-cask/0.6.0/rubylib/cask/cli.rb:21:in `process'
/usr/local/bin/brew-cask.rb:6
/usr/local/bin/brew:51:in `require'
/usr/local/bin/brew:51:in `require?'
/usr/local/bin/brew:91
=> brew --config
HOMEBREW_VERSION: 0.9.3
HEAD: 4baf64237d8fefba68a24e2237d08311592f00bb
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: dual-core 64-bit penryn
OS X: 10.8.2-x86_64
Xcode: 4.5.2
CLT: 4.5.0.0.1.1249367152
GCC-4.2: build 5666
LLVM-GCC: build 2336
Clang: 4.1 build 421
X11: 2.7.4 => /opt/X11
System Ruby: 1.8.7-358
Perl: /usr/local/perl/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /Users/ksmiley/.rbenv/shims/ruby

Any ideas?

Symlink issue

Using brew cask linkapps I get

/Users/robert/Applications/Caffeine.app already exists and is not a symlink, not linking caffeine

Shouldn't this relink?

lrwxr-xr-x  1 robert staff      45 Oct  8 20:40 Caffeine.app -> /usr/local/Cellar/caffeine/1.1.1/Caffeine.app

Support pkg installers

Command line pkg install

It's definitely possible to use the installer tool from the command line on pkgs. Should be able to build on some of my previous work from here:

https://github.com/phinze/puppet-workstation/blob/master/modules/puppet-macosx/lib/puppet/provider/package/macapp.rb#L74-87

Target the Caskroom

The real tricky part is to see if we can get the installer to target the Caskroom path, so that we keep the sexy Homebrew isolation of packages.

I've done some initial exploratory work on this - it seems like pkgs can be locked down such that they can only target a root volume.

There are a few strategies to try:

  • Trick installer into thinking a Caskroom path is a "volume" suitable for targeting
  • Modify the downloaded pkg to change the flag forcing the install to target a root volume

Now of course even if we pull this off, it may break some packages that rely on absolute path references to work. We can deal with that problem on a cask-by-cask basis.

Escalate privileges for some packages?

So if we can't do the Caskroom isolation for, say, virtual-box - I'd still like brew-cask to be able to manage that installation. So I'd like to explore whether we can have brew-cask

  • get root privileges
  • let the pkg have its way with the system
  • somehow manage the installed package even though it's not in the Caskroom

Fun times ahead!

Allow for more flexibility with multiple versions of the same app

In #114, I hinted at this, and #41 is the original issue. We need some way to support apps that have multiple concurrent builds/versions/channels. Here are the various situations in the Casks library at the moment:

These are just multiple stable/beta/alpha/nightlies, though. IntelliJ presents a different (but no less worthy) use-case: we currently has a cask each for the Community and Ultimate editions. It would be interesting to combine these!


My current proposal would have the formulae look like this:

class SomeCask < Cask
  url 'http://example.com/thing-1.0.0.dmg'
  homepage 'http://example.com'
  version '1.0.0'
  sha1 '...'

  # The devel spec has a version but no checksum
  # (useful when the file changes frequently and w/o warning).
  devel do
    url 'http://example.com/thing-1.1.0-beta.dmg'
    version '1.1.0-beta'
  end

  # The edge spec has no version nor checksum
  # (e.g. nightly builds). Will be installed under `EDGE`
  # as version-path.
  edge do
    url 'http://example.com/nightly.dmg'
  end

  # Specs can be customised (see below for more).
  # Can be useful for e.g. community/closed-source
  # alternates, or unbranded builds.
  spec :alternate do
    url 'http://example.com/thing-1.0.0-alternate.dmg'
    version '1.0.0'
    sha1 '...'
  end
end

Here's how the Firefox cask would be done:

class Firefox < Cask
  url 'http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases/17.0.1/mac/en-US/Firefox%2017.0.1.dmg'
  homepage 'http://www.mozilla.org/en-US/firefox/'
  version '17.0.1'
  sha1 'a9888ce69440574fabff712549c8ff503fd1acb7'

  # By default, both checksums and versions are required / checkedā€¦
  spec :beta do
    url 'http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases/18.0b3/mac/en-US/Firefox%2018.0b3.dmg'
    version '18.0b3'
    sha1 '31e383782b4fbbcbf3a1ef578d82cbf6861912cb'
  end

  # ā€¦and you can disable each separatelyā€¦
  spec :aurora, :checksum => false do
    url 'https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/firefox-19.0a2.en-US.mac.dmg'
    version '19.0a2'
  end

  # ā€¦and also set aliases for ease-of-use / familiarity
  spec :nightly, :checksum => false, :version => false, :alias => :edge do
    url 'http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/firefox-20.0a1.en-US.mac.dmg'
  end
end

With options looking like this:

# Predefined specs have predefined switches:
--stable
--devel
--edge

# Custom specs use a more generic syntax:
--spec=aurora

# Aliased specs can be accessed through any name:
--spec=nightly
--edge

# The generic syntax is also valid for predefined specs:
--spec=devel
--spec=stable

Please comment! with any ideas, criticisms, completely different proposals, or whatever else. This is quite a rough draft of an idea :)

search and linkapp commands fail with "Error: uninitialized constant Cask::Sourcetree"

brew cask search, brew cask search whatever and brew cask linkapps return the following error:

jack@mbp ~ % brew cask search Error: uninitialized constant Cask::Sourcetree Please report this bug: https://github.com/mxcl/homebrew/wiki/troubleshooting /usr/local/Cellar/brew-cask/0.2.0/rubylib/cask.rb:50:in const_get'
/usr/local/Cellar/brew-cask/0.2.0/rubylib/cask.rb:50:in load' /usr/local/Cellar/brew-cask/0.2.0/rubylib/cask.rb:30:in all'
/usr/local/Cellar/brew-cask/0.2.0/rubylib/cask.rb:30:in map' /usr/local/Cellar/brew-cask/0.2.0/rubylib/cask.rb:30:in all'
/usr/local/Cellar/brew-cask/0.2.0/rubylib/cask/cli/search.rb:4:in run' /usr/local/Cellar/brew-cask/0.2.0/rubylib/cask/cli.rb:17:in process'
/usr/local/bin/brew-cask.rb:6
/usr/local/bin/brew:51:in require' /usr/local/bin/brew:51:in require?'
/usr/local/bin/brew:91`

brew cask install works fine.

I'm using OS X 10.8.2 and homebrew 0.9.3.

brew doctor doesn't report any problems, Command Line Tools for Xcode are up to date (October 2012).

Discourage app store apps?

I don't think the readme addressed this. I've been assuming that it's not useful to include apps which are available and fully enabled (not old or powered down due to sanboxing) in the app store.

Preference Panes

So... What about preference panes?

They install just fine, but there's no linkapp for them. I think it's just a matter of detecting the .prefPane file and copying them to ~/Library/Pref Panes-something-or-other. But we'll also run into the systemwide vs home issue.

How does updating work?

When an app is updated via casks, what is the command to update it? Does this create a new app/version/ folder and delete the old binary or keep it? If you re-symlink it (which you'll need to do because the old symlink points to the wrong folder), will you get a "already exists and is not a symlink, not linking" message for it?

And what about auto-updating apps? The /app/version folder will be incorrect (except for apps with 'latest'), but I assume there's no real problem.

Undefined method 'sha1' for all recipes

Can not install anything on my fresh Mac (10.8.2). Here is an example, but it's happening on all recipes:

$ brew cask install adium
Error: undefined method sha1' for Adium:Class Please report this bug: https://github.com/mxcl/homebrew/wiki/troubleshooting /usr/local/Library/Taps/phinze-cask/Casks/adium.rb:6 /usr/local/Cellar/brew-cask/0.5.4/rubylib/cask.rb:42:inrequire'
/usr/local/Cellar/brew-cask/0.5.4/rubylib/cask.rb:42:in load' /usr/local/Cellar/brew-cask/0.5.4/rubylib/cask/cli/install.rb:5:inrun'
/usr/local/Cellar/brew-cask/0.5.4/rubylib/cask/cli/install.rb:3:in each' /usr/local/Cellar/brew-cask/0.5.4/rubylib/cask/cli/install.rb:3:inrun'
/usr/local/Cellar/brew-cask/0.5.4/rubylib/cask/cli.rb:17:in process' /usr/local/bin/brew-cask.rb:6 /usr/local/bin/brew:51:inrequire'
/usr/local/bin/brew:51:in `require?'
/usr/local/bin/brew:91

brew doctor is clean

git version 1.8.0.2
brew: 0.9.3
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
xcode Version 4.5.2 (4G2008a)
latest command line tools

Add support for custom options/flags

Take Firefox cask for an example; brew cask install firefox will install en-US version of Firefox by default. Could there be some switch to install different version of the program?

To install the British English version user could do something like

brew cask install firefox --lang en-GB

Multiple app install on a single line not supported?

When I tried to install multiple apps in one command, brew-cask would only install the first application like so:

macBook:~ me$ brew cask install dropbox firefox flux google-chrome the-unarchiver transmission vlc
==> Downloading https://ddr3luum8vl5r.cloudfront.net/Dropbox%201.4.12.dmg
######################################################################## 100.0%

==> Success! dropbox installed to /usr/local/Cellar/dropbox/1.4.12
macBook:~ me$ 

Google code hosted files cannot pass audit

So I was all excited about using HTTP HEAD + the content length header to get a lightweight and easy way to verify the presence of remote cask files.

It's definitely slow, but I liked the idea of an automated defense against link rot. However, Google Code - a place where many projects host their binaries, seems to not follow the spec and will respond 404 to a HEAD but 200 to a GET at the same path.

See http://code.google.com/p/support/issues/detail?id=660

I've run into several casks that I did not finish creating due to this limitation. I'm thinking this might be the time to drop the content_length idea. Checksums are more in line with homebrew anyways and if we want link rot detection maybe we can come up with a process out of band with respect to audit that doesn't require maintenance of an additional field.

:)

brew doctor reports new errors after using cask, uninstall/recovery unclear

Please help.
How do I recover my brew configuration from problems relating to use of cask?

All I want is cask out of my system and brew back to normal.

Perhaps "brew cask UNinstall" commands, etc are needed.

For me, it seems like no combination of install/uninstall, tap/untap can recover brew & make the doctor happy.

Here's the issue I want to fix

$brew doctor
Error: Failed to import: chromium
Error: class "Create" expected but not found in create.rb
Double-check the name of the class in that formula.
Error: Failed to import: create
Error: Failed to import: thunderbird
Error: Failed to import: transmit

Here's the short version of how I got there...

  1. install cask, install the apps, decide cask isn't for me...
  2. rm -R /usr/local/Cellar/ the apps
  3. brew untap phinze/cask
    Now it seems like no combination of install/uninstall, tap/untap can recover brew

how I got there:

INSTALL CASK

$brew tap phinze/cask 
Cloning into '/usr/local/Library/Taps/phinze-cask'...
remote: Counting objects: 403, done.
remote: Compressing objects: 100% (256/256), done.
remote: Total 403 (delta 166), reused 376 (delta 141)
Receiving objects: 100% (403/403), 59.31 KiB, done.
Resolving deltas: 100% (166/166), done.
Tapped 1 formula
 $brew install brew-cask
==> Cloning https://github.com/phinze/homebrew-cask.git
Updating /Library/Caches/Homebrew/brew-cask--git
==> Checking out tag v0.3.3
/usr/local/Cellar/brew-cask/0.3.3: 61 files, 252K, built in 2 seconds

INSTALL APPS

$brew cask install google-chrome
==> Downloading https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg
######################################################################## 100.0%

==> Success! google-chrome installed to /usr/local/Cellar/google-chrome/stable-channel
$brew cask install thunderbird
==> Downloading http://download.mozilla.org/?product=thunderbird-15.0.1&os=osx&lang=en-US
######################################################################## 100.0%

==> Success! thunderbird installed to /usr/local/Cellar/thunderbird/15.0.1

$brew cask install transmit
==> Downloading http://www.panic.com/transmit/d/Transmit%204.2.zip
######################################################################## 100.0%

==> Success! transmit installed to /usr/local/Cellar/transmit/4.2

DELETE APPS
rm -R /usr/local/Cellar/google-chrome /usr/local/Cellar/thunderbird /usr/local/Cellar/transmit

UNINSTALL BREW-CASK

$brew uninstall brew-cask
Uninstalling /usr/local/Cellar/brew-cask/0.3.3...
tking@ember: ~ $brew untap phinze/cask 
Untapped 1 formula

Undefined Method `content_length` when calling any Cask command.

Error: undefined method content_length' for Adium:Class Please report this bug: https://github.com/mxcl/homebrew/wiki/troubleshooting /usr/local/Library/Taps/phinze-cask/Casks/adium.rb:5 /usr/local/Cellar/brew-cask/0.4.0/rubylib/cask.rb:50:inrequire'
/usr/local/Cellar/brew-cask/0.4.0/rubylib/cask.rb:50:in load' /usr/local/Cellar/brew-cask/0.4.0/rubylib/cask/scopes.rb:19:inall'
/usr/local/Cellar/brew-cask/0.4.0/rubylib/cask/scopes.rb:9:in map' /usr/local/Cellar/brew-cask/0.4.0/rubylib/cask/scopes.rb:9:inall'
/usr/local/Cellar/brew-cask/0.4.0/rubylib/cask/cli/search.rb:5:in run' /usr/local/Cellar/brew-cask/0.4.0/rubylib/cask/cli.rb:17:inprocess'
/usr/local/bin/brew-cask.rb:6
/usr/local/bin/brew:51:in require' /usr/local/bin/brew:51:inrequire?'
/usr/local/bin/brew:91

Cask option for checksums

If this were ever to be incorporated into a systems administration workflow (which it's got a lot of potential for), checksums should be cask option to prevent the installation of malicious software.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.