vyc3jq
Last Updated: February 25, 2016
·
578
· ksi

The missing brew bundle

Since homebrew doesn't support bundle anymore, I get around it by adding a simple shell script as ~/bin/brew-bundle

#!/bin/bash

file="$1"
if [ -z "$file" ]; then
  echo "Usage: brew-bundle <Brewfile>"
  exit 1
fi

while read -r line || [[ -n $line ]]
do
  command=${line/##*/}
  if [ -n "$command" ]; then
    brew $command
  fi
done < "$file"

This first version ignores lines starting with #.