aboutsummaryrefslogtreecommitdiffstats
path: root/homebrew/sync-brewfile.sh
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2024-08-10 14:47:44 -0400
committerEugene Triguba <eugenetriguba@gmail.com>2024-08-10 14:47:44 -0400
commit4f609b0cbc7526caebb631eb15ad2c069492e28d (patch)
treeb88aa60539403ffca6a060e76a493d42ceb15613 /homebrew/sync-brewfile.sh
parentUpdate vim config (diff)
downloaddotfiles-4f609b0cbc7526caebb631eb15ad2c069492e28d.zip
Add brewfile sync script
Diffstat (limited to 'homebrew/sync-brewfile.sh')
-rwxr-xr-xhomebrew/sync-brewfile.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/homebrew/sync-brewfile.sh b/homebrew/sync-brewfile.sh
new file mode 100755
index 0000000..3768d7b
--- /dev/null
+++ b/homebrew/sync-brewfile.sh
@@ -0,0 +1,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."