/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
יש להריץ את הפקודה הבאה במסוף.
הסקריפט יסביר מה הוא יעשה ויעצור לפני שיעשה זאת. קיימות אפשרויות נוספות להתקנה כאן.
Homebrew מתקין חבילות לתיקיות משלהן ואז יוצר symlinks לקבצים שלהן לתוך /opt/homebrew
.
$ cd /opt/homebrew
$ 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/wget
Homebrew לא יתקין קבצים מחוץ לתיקייה שלו. אפשר להתקין את Homebrew בכל מקום כרצונך.
אפשר ליצור חבילות Homebrew משלך כל כמה זמן.
$ brew create https://foo.com/foo-1.0.tgz
Created /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/foo.rb
הכול בנוי על גבי Git ו־Ruby, אז אפשר לשנות דברים ללא חשש מתוך ידיעה שניתן בקלות לבטל את השינויים ולמשוך עדכונים.
$ brew edit wget # opens in $EDITOR!
ב־Homebrew, ״נוסחאות״ ההתקנה הן סקריפטים פשוטים ב־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
end
Homebrew משלים את macOS. יש להתקין את RubyGems שלך עם gem
, ואת התלויות שלהם עם brew
.
“להתקנה, יש לגרור את הסמל הזה…” לא עוד. Homebrew Cask מתקין יישומים, גופנים ותוספים עבור macOS apps, ועוד תוכנה שאינה בקוד פתוח.
$ brew install --cask firefox
יצירת cask פשוטה כמו יצירת נוסחה.
$ brew create --cask https://foo.com/foo-1.0.dmg
Editing /opt/homebrew/Library/Taps/homebrew/homebrew-cask/Casks/foo.rb
man brew
documentationHomebrew נוצר על ידי Max Howell. האתר נבנה על ידי Rémi Prévost, Mike McQuaid וגם Danielle Lalonde.