aboutsummaryrefslogtreecommitdiffstats
path: root/macos/homebrew/sync-brewfile.sh
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2025-11-26 09:02:24 -0500
committerEugene Triguba <hello@eugenetriguba.com>2025-11-26 09:02:24 -0500
commit18786a2e053f1837f068d3cadbd3afcefc9b0e80 (patch)
treeba21156c5cecf9326e279a4e145466902d980345 /macos/homebrew/sync-brewfile.sh
parentAdd support for openbsd (diff)
downloaddotfiles-18786a2e053f1837f068d3cadbd3afcefc9b0e80.zip
Move homebrew to macos/
Diffstat (limited to 'macos/homebrew/sync-brewfile.sh')
-rwxr-xr-xmacos/homebrew/sync-brewfile.sh17
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."