2012-03-04 16:52:50 -08:00
|
|
|
class ScriptFileFormula < Formula
|
|
|
|
def install
|
2016-07-16 22:15:23 +01:00
|
|
|
odeprecated "ScriptFileFormula#install", "Formula#install"
|
2015-08-03 13:09:07 +01:00
|
|
|
bin.install Dir["*"]
|
2012-03-04 16:52:50 -08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class GithubGistFormula < ScriptFileFormula
|
2014-12-26 01:31:56 -05:00
|
|
|
def self.url(val)
|
2016-07-16 22:15:23 +01:00
|
|
|
odeprecated "GithubGistFormula.url", "Formula.url"
|
2013-04-13 17:40:12 -05:00
|
|
|
super
|
2014-12-26 01:31:56 -05:00
|
|
|
version File.basename(File.dirname(val))[0, 6]
|
2012-03-04 16:52:50 -08:00
|
|
|
end
|
|
|
|
end
|
2012-03-04 16:56:59 -08:00
|
|
|
|
|
|
|
# This formula serves as the base class for several very similar
|
|
|
|
# formulae for Amazon Web Services related tools.
|
|
|
|
class AmazonWebServicesFormula < Formula
|
|
|
|
# Use this method to peform a standard install for Java-based tools,
|
|
|
|
# keeping the .jars out of HOMEBREW_PREFIX/lib
|
2014-12-26 16:30:58 -05:00
|
|
|
def install
|
2016-07-16 22:15:23 +01:00
|
|
|
odeprecated "AmazonWebServicesFormula#install", "Formula#install"
|
|
|
|
|
2015-08-03 13:09:07 +01:00
|
|
|
rm Dir["bin/*.cmd"] # Remove Windows versions
|
|
|
|
libexec.install Dir["*"]
|
2013-11-15 23:57:07 -08:00
|
|
|
bin.install_symlink Dir["#{libexec}/bin/*"] - ["#{libexec}/bin/service"]
|
2012-03-04 16:56:59 -08:00
|
|
|
end
|
2014-12-26 16:30:58 -05:00
|
|
|
alias_method :standard_install, :install
|
2012-03-04 16:56:59 -08:00
|
|
|
|
|
|
|
# Use this method to generate standard caveats.
|
2015-08-03 13:09:07 +01:00
|
|
|
def standard_instructions(home_name, home_value = libexec)
|
2016-07-16 22:15:23 +01:00
|
|
|
odeprecated "AmazonWebServicesFormula#standard_instructions", "Formula#caveats"
|
|
|
|
|
2012-03-04 16:56:59 -08:00
|
|
|
<<-EOS.undent
|
2014-03-10 18:45:24 -07:00
|
|
|
Before you can use these tools you must export some variables to your $SHELL.
|
2012-03-04 16:56:59 -08:00
|
|
|
|
|
|
|
To export the needed variables, add them to your dotfiles.
|
|
|
|
* On Bash, add them to `~/.bash_profile`.
|
|
|
|
* On Zsh, add them to `~/.zprofile` instead.
|
|
|
|
|
|
|
|
export JAVA_HOME="$(/usr/libexec/java_home)"
|
2014-03-10 18:45:24 -07:00
|
|
|
export AWS_ACCESS_KEY="<Your AWS Access ID>"
|
|
|
|
export AWS_SECRET_KEY="<Your AWS Secret Key>"
|
2014-01-15 19:05:20 +09:00
|
|
|
export #{home_name}="#{home_value}"
|
2012-03-04 16:56:59 -08:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|