-
-
Save vitalii-c/df259c46b9d263ccde8f305a029a49b9 to your computer and use it in GitHub Desktop.
Revisions
-
Julian Pawlowski revised this gist
Mar 26, 2013 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -25,11 +25,12 @@ cat /tmp/brew-sync.installed | sort | uniq > ~/Dropbox/Apps/Homebrew/brew-sync.i # Set taps echo "Enabling taps ..." for TAP in `cat ~/Dropbox/Apps/Homebrew/brew-sync.taps`; do $BREW tap ${TAP} >/dev/null done # Install missing Homebrew packages echo "Install missing packages ..." for PACKAGE in `cat ~/Dropbox/Apps/Homebrew/brew-sync.installed`; do $BREW list ${PACKAGE} >/dev/null [ "$?" != "0" ] && $BREW install ${PACKAGE} done -
Julian Pawlowski created this gist
Mar 26, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ #!/bin/bash # Sync Homebrew installations between Macs via Dropbox # BREW="/usr/local/bin/brew" # first get local settings echo "Reading local settings ..." rm -f /tmp/brew-sync.* $BREW tap > /tmp/brew-sync.taps $BREW list > /tmp/brew-sync.installed # then combine it with list in Dropbox echo "Reading settings from Dropbox ..." [ -e ~/Dropbox/Apps/Homebrew/brew-sync.taps ] && cat ~/Dropbox/Apps/Homebrew/brew-sync.taps >> /tmp/brew-sync.taps [ -e ~/Dropbox/Apps/Homebrew/brew-sync.installed ] && cat ~/Dropbox/Apps/Homebrew/brew-sync.installed >> /tmp/brew-sync.installed # make the lists unique and sync into Dropbox echo "Syncing to Dropbox ..." mkdir -p ~/Dropbox/Apps/Homebrew cat /tmp/brew-sync.taps | sort | uniq > ~/Dropbox/Apps/Homebrew/brew-sync.taps cat /tmp/brew-sync.installed | sort | uniq > ~/Dropbox/Apps/Homebrew/brew-sync.installed # Set taps echo "Enabling taps ..." for TAP in `cat ~/Dropbox/Apps/Homebrew/brew-sync.taps`; do $BREW tap ${TAP} >/dev/null done # Install missing Homebrew packages echo "Install missing packages ..." for PACKAGE in `cat ~/Dropbox/Apps/Homebrew/brew-sync.installed`; do [[ `$BREW list ${PACKAGE} >/dev/null` ]] && $BREW install ${PACKAGE} done