/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
יש להריץ את הפקודה הבאה במסוף.
הסקריפט יסביר מה הוא יעשה ויעצור לפני שיעשה זאת. קיימות אפשרויות נוספות להתקנה כאן.
If you're on macOS, try our new .pkg
installer.
Download it from Homebrew's latest GitHub release.
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
desc "Internet file retriever"
homepage "https://www.gnu.org/software/wget/"
url "https://ftp.gnu.org/gnu/wget/wget-1.24.5.tar.gz"
sha256 "fa2dc35bab5184ecbc46a9ef83def2aaaa3f4c9f3c97d4bd19dcb07d4da637de"
license "GPL-3.0-or-later"
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.