Created
July 25, 2018 23:12
-
-
Save markuskreitzer/79a1e0a254c846a13f4e8a6d1273565f to your computer and use it in GitHub Desktop.
Hack brew to always keep a copy of your latests casks and brews on Dropbox
This file contains hidden or 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
# Append the following to your .bashrc or file that contains your user profile: | |
function brew(){ | |
case $1 in | |
install) | |
echo "Install" | |
/usr/local/bin/brew $* | |
/usr/local/bin/brew list > ~/Dropbox/new_comp/mac/brews_autolisted.txt | |
;; | |
cask) | |
echo "Cask" | |
if [[ $2 == 'install' ]] | |
then | |
echo "Cask Install" | |
/usr/local/bin/brew $* | |
/usr/local/bin/brew cask list > ~/Dropbox/new_comp/mac/brews_autolisted.txt | |
else | |
echo "Got: $*" | |
/usr/local/bin/brew $* | |
fi | |
;; | |
*) | |
echo "Got: $*" | |
/usr/local/bin/brew $* | |
;; | |
esac | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment