ã¯ããã«
macOS ã§ã¯ãããã¤ãã®ã½ããã¦ã§ã¢å®è¡å½¢æ ãããã¾ãã
- UNIX ãªã©ã§ãã使ãããã¢ããª
- Mac App Store ã§è²©å£²ããã¦ããã¢ããª
- ãã£ã¹ã¯ã¤ã¡ã¼ã¸(dmg)ãªã©ã§ã¤ã³ã¹ãã¼ã©ãé å¸ãããã¢ããª
ããããã¤ã³ã¹ãã¼ã«ã®ä»æ¹ãéãã¾ãããå¥åã«ä½æ¥ããã®ã¯é¢åã§ãããã®ããããããããã¹ã¦ããã±ã¼ã¸ç®¡çã½ããã¦ã§ã¢ã§ã¤ã³ã¹ãã¼ã«ããããã«ãã¾ããããã§ã¯ homebrew 㨠mas ã¨ããããã±ã¼ã¸ç®¡çã½ããã¦ã§ã¢ãè¨å®ããã¿ã¼ããã«ä¸ã®ã³ãã³ãã§ã¤ã³ã¹ãã¼ã«ã§ããããã«è¨å®ãã¾ãã
Homebrew ã®ã¤ã³ã¹ãã¼ã«
次ã«ããã±ã¼ã¸ç®¡çã·ã¹ãã ã§ãã Homebrew ãã¤ã³ã¹ãã¼ã«ãã¾ãã
- ã¿ã¼ããã«ãéãã¾ãã
- ä¸è¨ Homebrew ã®ãµã¤ãã«æ¸ããã¦ããã¤ã³ã¹ãã¼ã«ã¹ã¯ãªãããå®è¡ãã¾ãããã¹ã¯ã¼ãå ¥åãæ±ããããã®ã§ããã¹ã¯ã¼ããå ¥åãã¦ãã ããããã¨ã¯æ示ã«å¾ã£ã¦ãã ããã
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- ãInstallation successful!ãã¨åºãã°æåã§ãã
Homebrew cask ã®ã¤ã³ã¹ãã¼ã«
Homebrew 3.0 ãã cask 㯠brew ã®ã³ãã³ãã§ã¯ãªããªãã·ã§ã³ã«ãªãã¾ããã以ä¸ã®ããã«ãã¦ãcask ã tap ãã¦ããã¾ãã
brew tap homebrew/cask
brew tap ã¨ãã¦ä»¥ä¸ã®ããã«äºã¤è¡¨ç¤ºãããã°æåã§ãã
hkob@BYOD-macOS ~ % brew tap homebrew/cask homebrew/core
Homebrew ã«ãã mas ã®ã¤ã³ã¹ãã¼ã«
App Store ã§æ¤ç´¢ããªãããã¤ã³ã¹ãã¼ã«ãã¦ãããã§ãããåã¤ã³ã¹ãã¼ã«ãªã©ã®éã«åå¥ã«ã¤ã³ã¹ãã¼ã«ããã®ã¯é¢åã§ããããã§ããããã³ãã³ãã§ã¤ã³ã¹ãã¼ã«ã§ããããã« mas ãã¤ã³ã¹ãã¼ã«ãã¾ããmas èªä½ã¯ Homebrew ã§ã¤ã³ã¹ãã¼ã«ã§ãã¾ããããã§ã¯ãã»ã¨ãã©ã®ä½æ¥ãèªååããããã«ãBrewfile ã¨ãã管çãã¡ã¤ã«ã使ã£ã¦ã½ããã¦ã§ã¢ã管çãã¾ãããã
ã¾ããmas ã Homebrew ã§ã¤ã³ã¹ãã¼ã«ã§ããããã« Brewfile ãä½æãã¦ã¿ã¾ãã1è¡ã ããªã®ã§ãecho æã§ãbrew "mas"ãã¨ããè¡ã Brewfile ã¨ãã¦æ¸ãåºãã¾ãã
echo 'brew "mas"' > Brewfile
cat ã³ãã³ãã§ä¸èº«ã確èªãã¦ã¿ã¾ãã
hkob@BYOD-macOS ~ % cat Brewfile brew "mas"
ããã§æºå㯠Ok ã§ãããbrew bundle -vãã¨ãããã¨ã§ãBrewfile ã«æ¸ãããã½ããã¦ã§ã¢ãèªåã§ã¤ã³ã¹ãã¼ã«ããã¾ãã
hkob@BYOD-macOS ~ % brew bundle -v /usr/local/bin/brew tap homebrew/bundle ==> Tapping homebrew/bundle Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle'... remote: Enumerating objects: 51, done. remote: Counting objects: 100% (51/51), done. remote: Compressing objects: 100% (45/45), done. remote: Total 5886 (delta 19), reused 14 (delta 6), pack-reused 5835 Receiving objects: 100% (5886/5886), 1.34 MiB | 2.30 MiB/s, done. Resolving deltas: 100% (3442/3442), done. Tapped 1 command (109 files, 1.7MB). Installing mas formula. It is not currently installed. ==> Downloading https://homebrew.bintray.com/bottles/mas-1.8.1.big_sur.bottle.ta ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/d92cfc734e730fde87b29 ######################################################################## 100.0% ==> Pouring mas-1.8.1.big_sur.bottle.tar.gz ðº /usr/local/Cellar/mas/1.8.1: 50 files, 12.9MB Installing mas Homebrew Bundle complete! 1 Brewfile dependency now installed.
Homebrew cask ã«ãã Google Chrome ã®ã¤ã³ã¹ãã¼ã«
GUI ã¢ããªã±ã¼ã·ã§ã³ã¯ cask ã§ã¤ã³ã¹ãã¼ã«ãã¾ãããã¼ã¯ã¼ããããããªãã®ã§ãbrew search ã§æ¤ç´¢ãã¦ã¿ã¾ããããã¤ããã¼ã¸ã§ã³ãããã¾ãããä½ãã¤ãã¦ããªã google-chrome ã§ããããã§ãã==> Casks ã®å¾ãã«æ¸ããã¦ããã®ã§ãcask ã§ã¤ã³ã¹ãã¼ã«ãã¾ãã
hkob@BYOD-macOS ~ % brew search google chrome
==> Casks
google-chrome
homebrew/cask-versions/google-chrome-beta
homebrew/cask-versions/google-chrome-canary
homebrew/cask-versions/google-chrome-dev
å ã»ã©ã® Brewfile ãã¨ãã£ã¿ã§ç·¨éãã¦ãããã®ã§ãããã¿ã¼ããã«ãéãã¦ãããªããå ã»ã©ã¨åãããã« echo ã§è¿½å ãã¦ãããã§ããã>>ãã¨ãããã¨ã§ãã¡ã¤ã«ã®æ«å°¾ã«è¿½è¨ãã¾ãã
echo 'cask "google-chrome"' >> Brewfile
念ã®ããä¸èº«ã確èªãã¦ã¿ã¾ããããã¡ããã¨è¿½è¨ããã¦ãã¾ãã
hkob@BYOD-macOS ~ % cat Brewfile brew "mas" cask "google-chrome"
å ã»ã©ã¨åãããã« brew bundle -v ã§ã¤ã³ã¹ãã¼ã«ãã§ãã¾ãã
hkob@BYOD-macOS ~ % brew bundle -v Skipping install of mas formula. It is already up-to-date. Using mas Installing google-chrome cask. It is not currently installed. ==> Downloading https://dl.google.com/chrome/mac/universal/stable/GGRO/googlechr ######################################################################## 100.0% Warning: No checksum defined for cask 'google-chrome', skipping verification. ==> Installing Cask google-chrome ==> Moving App 'Google Chrome.app' to '/Applications/Google Chrome.app' ðº google-chrome was successfully installed! Installing google-chrome Homebrew Bundle complete! 2 Brewfile dependencies now installed.
mas ã«ãã Verve ã®ã¤ã³ã¹ãã¼ã«
Mac App Store ã§é å¸ããã¦ããã¢ããªã¯ mas ã³ãã³ãã§ã¤ã³ã¹ãã¼ã«ã§ãã¾ãããã¡ããã¢ããªåãããã£ã¦ããã°ãmas search ã³ãã³ãã§æ¤ç´¢ã§ãã¾ããããã§ã¯ãé»æ°é»åå·¥å¦ã³ã¼ã¹ã§ä½æãã Verve ã¨ããé»ç£æ°å¦ã¢ããªãæ¤ç´¢ãã¦ã¿ã¾ãã
hkob@BYOD-macOS ~ % mas search verve 1436374224 Verve (1.0.2)
mas ã§å¿ è¦ãªã®ã¯ãåã«æ¸ãã¦ãã id ã§ããããã以ä¸ã®ããã« Brewfile ã«è¿½è¨ãã¾ãã
echo 'mas "Verve", id: 1436374224' >> Brewfile
念ã®ããä¸èº«ã確èªãã¾ãã
hkob@BYOD-macOS ~ % cat Brewfile brew "mas" cask "google-chrome" mas "Verve", id: 1436374224
å ã»ã©ã¨åãããã« brew bundle -v ã§ã¤ã³ã¹ãã¼ã«ãã§ãã¾ãã
hkob@BYOD-macOS ~ % brew bundle -v Skipping install of mas formula. It is already up-to-date. Using mas Using google-chrome Installing Verve app. It is not currently installed. ==> Downloading Verve ==> Installed Verve Installing Verve Homebrew Bundle complete! 3 Brewfile dependencies now installed.
ãããã«
ã½ããã¦ã§ã¢ã追å ããããã°ããããªæã㧠Brewfile ãæ¸ãã¦ã¯ãbrew bundle -v ã¨ããã ãã§ãããã® Brewfile ããã©ããã«ä¿ç®¡ãã¦ããã°ãæ°ãã Mac ãè²·ã£ã¦ãããã«ç°å¢ã復å ã§ãã¾ããã¾ããé©å½ãªã¿ã¤ãã³ã°ã§ brew bundle -v ããã¨ãã¤ã³ã¹ãã¼ã«ãã¦ããã½ããã¦ã§ã¢ãã¢ãããã¼ãããã¾ãã
è£è¶³ (ãã§ã« Homebrew ã使ã£ã¦ããä¸ç´å¦çã¸)
Brewfile ã¯ä»¥ä¸ã®ã³ãã³ããå®è¡ãããã¨ã§ããã§ã«ã¤ã³ã¹ãã¼ã«æ¸ã®ãã®ããèªåçæãããã¨ãã§ãã¾ãã
brew bundle dump
æ°ããã½ããã¦ã§ã¢ãã¤ã³ã¹ãã¼ã«ããããã°ããã®ãã¡ã¤ã«ãæ´æ°ããbrew bundle -v
ã¨ããã°ããã§ãã