Created
June 20, 2019 12:53
-
-
Save zachselby/14ac793977fc46a8315d0f0fa14def4e to your computer and use it in GitHub Desktop.
Use Homebrew for Multiple Users
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Create a new group, brew | |
sudo dseditgroup -o create brew | |
# Change owner to brew group on brew assets | |
sudo chgrp -R brew $(brew --prefix)/* | |
# Change permissions to brew group | |
sudo chmod -R g+w $(brew --prefix)/* | |
# Add a user to the brew group | |
sudo dseditgroup -o edit -a userOne -t user brew | |
# Add another user to the brew group | |
sudo dseditgroup -o edit -a userTwo -t user brew | |
# Validate links, etc. | |
brew doctor | |
# Make any corrections from the `brew doctor` warnings | |
# Run brew doctor to validate fixes | |
brew doctor | |
# Make sure it's working without error, with an update | |
brew update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment