aboutsummaryrefslogtreecommitdiffstats
path: root/homebrew/sync-brewfile.sh
blob: 3768d7b9ab30cc6b36ba4ccfc11db6931cf9995d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

# Create a new Brewfile with only manually installed formulae and casks
(echo 'tap "homebrew/cask-fonts"'; \
 echo 'tap "neovim/neovim"'; \
 echo 'tap "eugenetriguba/bolt"'; \
 brew bundle dump --file=- --force | \
 (grep -E "^brew" | grep -f <(brew leaves) ; brew list --cask | sed 's/^/cask "/;s/$/"/') | \
 sort) > Brewfile

echo "Brewfile has been updated with only manually installed packages."