diff options
Diffstat (limited to 'macos/homebrew/sync-brewfile.sh')
| -rwxr-xr-x | macos/homebrew/sync-brewfile.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/macos/homebrew/sync-brewfile.sh b/macos/homebrew/sync-brewfile.sh new file mode 100755 index 0000000..19b5970 --- /dev/null +++ b/macos/homebrew/sync-brewfile.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -eou pipefail + +# Create a new Brewfile with only manually installed formulae and casks +( + echo 'tap "neovim/neovim"' + echo 'tap "eugenetriguba/bolt", "https://git.sr.ht/~eugenetriguba/homebrew-bolt"' + echo 'tap "eugenetriguba/justify", "https://git.sr.ht/~eugenetriguba/homebrew-justify"' + 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." |