/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
このスクリプトをターミナルに貼り付け実行して下さい。
スクリプトは何をするのか説明し、実際にインストールを実行する前に一度中断します。こちらでインストールオプションを確認できます (required for Linux and Windows Subsystem for Linux)。
Homebrew は個別のディレクトリにパッケージをインストールし、それらへのシンボリックリンクを /usr/local に作ります。
$ cd /usr/local
$ find Cellar
Cellar/wget/1.16.1
Cellar/wget/1.16.1/bin/wget
Cellar/wget/1.16.1/share/man/man1/wget.1
$ ls -l bin
bin/wget -> ../Cellar/wget/1.16.1/bin/wgetHomebrew は決められたディレクトリの中だけにファイルをインストールします。また、Homebrew をインストールする場所は自由に決めることもできます。
Homebrew のパッケージは簡単に作ることができます。
$ brew create https://foo.com/bar-1.0.tgz
Created /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/bar.rbHomebrew はすべて Git と Ruby で動いているので、あなたが既に持っている知識で簡単に変更できます。
$ brew edit wget # opens in $EDITOR!Homebrew の formula はシンプルな Ruby スクリプトです:
class Wget < Formula
homepage "https://www.gnu.org/software/wget/"
url "https://ftp.gnu.org/gnu/wget/wget-1.15.tar.gz"
sha256 "52126be8cf1bddd7536886e74c053ad7d0ed2aa89b4b630f76785bac21695fcd"
def install
system "./configure", "--prefix=#{prefix}"
system "make", "install"
end
endHomebrew は macOS の機能を補完します。gem コマンドで gem を、そして brew コマンドでそれらの依存関係をインストールします。
"To install, drag this icon..." no more. brew cask installs macOS apps, fonts and plugins and other non-open source software.
$ brew cask install firefoxMaking a cask is as simple as creating a formula.
$ brew cask create foo
Editing /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/foo.rbHomebrewはMax Howellによって開発されました。 ウェブサイト作成:Rémi Prévost, Mike McQuaid, Danielle Lalonde. 翻訳:Ryuichi Okumura.