mirror of
https://github.com/d0zingcat/dotfiles.git
synced 2026-06-03 07:26:48 +00:00
feat: add command for backup/recover brewfile
Signed-off-by: Li Tang <iamtangli42@gmail.com>
This commit is contained in:
28
brewfiles/README.md
Normal file
28
brewfiles/README.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Per-Machine Brewfiles
|
||||
|
||||
Each Mac keeps its own Homebrew bundle under `brewfiles/<hostname>/Brewfile`, where `<hostname>` is the short hostname (`hostname -s`, e.g. `stardewvalley`).
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
# Dump only (frequent updates)
|
||||
./setup.sh brew-backup
|
||||
|
||||
# Install packages for this machine
|
||||
./setup.sh brew-install
|
||||
|
||||
# Full backup still includes brew-backup
|
||||
./setup.sh backup
|
||||
```
|
||||
|
||||
## New machine / full recover
|
||||
|
||||
`./setup.sh full-recover` runs `brew-install` automatically when a Brewfile exists for the current hostname.
|
||||
|
||||
## Hostname changed?
|
||||
|
||||
Point at another machine's Brewfile:
|
||||
|
||||
```bash
|
||||
BREWFILE_HOST=other-mac ./setup.sh brew-install
|
||||
```
|
||||
Reference in New Issue
Block a user