homebrew-core/Formula/cask.rb
Antonio Santos a4abf1b905 cask 0.6.0
Update Cask to version 0.6.0

Closes Homebrew/homebrew#27724.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-03-20 12:16:57 +00:00

33 lines
771 B
Ruby

require "formula"
class NewEnoughEmacs < Requirement
fatal true
default_formula "emacs"
def satisfied?
major_version = `emacs --batch --eval "(princ emacs-major-version)"`.to_i
major_version >= 23
end
def message
"Emacs 23 or later is required to run cask."
end
end
class Cask < Formula
homepage "http://cask.github.io/"
url "https://github.com/cask/cask/archive/v0.6.0.tar.gz"
sha1 "6f836bb41f034d6be9611ee09c78eb8cc52b53ca"
head "https://github.com/cask/cask.git"
depends_on NewEnoughEmacs
def install
zsh_completion.install "etc/cask_completion.zsh"
bin.install "bin/cask"
prefix.install Dir["*.el"]
prefix.install "templates"
# Stop cask performing self-upgrades.
touch prefix/".no-upgrade"
end
end