Skip to content

aamortimer/brewfile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Setup

New mac setup

Install

You can install this project by either running:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/aamortimer/brewfile/master/install.sh | sh)"

or

mkdir -p ~/Sites/brefile
cd ~/Sites
git clone https://github.com/aamortimer/brewfile.git
cd ~/Sites/brewfile
./install.sh

The above will guide you through setting up the following.

  • Installs XCode command line tools if not already installed
  • Install brew and homebrew file if not already installed (https://github.com/rcmdnk/homebrew-file)
  • Optionally installs brew apache
  • Optionally installs multiple versions of PHP
  • Optionally installs multiple versions of DNSmasq
  • Optionally installs APCu for PHP
  • Optionally installs PHP YAML
  • Optionally installs XDebug and Xdebug Toggler for OSX
  • Optionally Creates SSH key

The Apache PHP setup comes from the following guide macOS 10.14 Mojave Apache Setup: Multiple PHP Versions

Brew file recommendations

Install brew wrap brew wrap to keep the brew file updates

curl -L https://raw.githubusercontent.com/rcmdnk/homebrew-file/master/etc/brew-wrap > $(brew --prefix)/etc/brew-wrap

To enable it, just read this file in your .bashrc or any of your setup file:

if [ -f $(brew --prefix)/etc/brew-wrap ];then
  source $(brew --prefix)/etc/brew-wrap
fi

If you are using multiple Mac in the same time, it is good to have a cron job like:

30 12 * * * brew file update

This command installs new packages which were installed in another Mac at a lunch time (12:30) every day.

Bash Completions

Bash completions are added via the brewfile to enable them add the following to your .bashrc file

brew_completion=$(brew --prefix 2>/dev/null)/etc/bash_completion
if [ $? -eq 0 ] && [ -f "$brew_completion" ];then
  source $brew_completion
fi

Zsh

Install with:

brew install zsh
brew install zsh-completions
brew install zsh-syntax-highlighting

and then add the following to your settings in your .zshrc:

for d in "/share/zsh-completions" "/share/zsh/zsh-site-functions";do
  brew_completion=$(brew --prefix 2>/dev/null)$d
  if [ $? -eq 0 ] && [ -d "$brew_completion" ];then
    fpath=($brew_completion $fpath)
  fi
done
autoload -U compinit
compinit

Install apache modules

You can install this project by either running:

npm install --global apache-module-manager
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/aamortimer/brewfile/master/apachemod.sh | sh)"

Releases

No releases published

Packages

No packages published