Skip to content

elsevers/brew-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

brew-sync

Synchronize brew packages across Eric's Macs

Table of Contents

Purpose of Document

This repository houses the list of brew packages that Eric uses on his Mac computers. A script is provided that shouold be periodically run (weekly is suggested) to maintain the repository, install status, and update brew packages.

Setup Instructions

1. Install brew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

2. Run these commands

cd ~
gh repo clone elsevers/brew-sync
cd brew-sync
brew bundle install
chmod +x sync-my-brew.sh
echo 'alias sync-my-brew="~/brew-sync/sync-my-brew.sh"' >> ~/.zshrc
source ~/.zshrc

Maintenance Instructions

Run this script periodically (weekly is recommended):

sync-my-brew

This will:

  1. Update and upgrade all brew packages
  2. Pull in any new packages added ti git from another computer
  3. Commit to git and push up to GitHub any packages install on this computer

Package Removal Instructions

Removing a package from all Macs in the sync chain requires deliberate effort to prevent sync-my-brew.sh from reinstalling them. To remove packages, do the following:

1. On Mac A (The Origin)

First, make sure everything is sync'd:

brew-sync

Uninstall the package normally: brew uninstall <package-name>

Run the following commands:

cd ~/brew-sync
rm BrewFile
brew bundle dump -f
git add Brewfile
git commit -m "Remove package(s) from BrewFile"
git push

This updates your Brewfile on GitHub so it no longer includes the package.

2. On Mac B (The Destination)

cd ~/dotfiles
git pull
brew bundle cleanup --force

About

Repo to sync brew installs across Eric's Macs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors