Created
December 8, 2016 22:18
-
-
Save AndyFrench/dd2e685722d4d873515e8c05eb70980b to your computer and use it in GitHub Desktop.
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
brew_cask_expand_alias() { | |
brew cask info "$1" 2>/dev/null | head -1 | awk '{gsub(/:/, ""); print $1}' | |
} | |
brew_cask_is_installed() { | |
local NAME=$(brew_cask_expand_alias "$1") | |
brew cask list -1 | grep -Fqx "$NAME" | |
} | |
brew_cask_install() { | |
if ! brew_cask_is_installed "$1"; then | |
brew cask install "$@" | |
fi | |
} | |
brew_cask_install_or_upgrade() { | |
if brew_cask_is_installed "$1"; then | |
echo "$1 is already installed, brew cask upgrade is not yet implemented" | |
else | |
brew cask install "$@" | |
fi | |
} | |
brew tap caskroom/cask | |
brew_install_or_upgrade 'zsh-completions' | |
brew_install_or_upgrade 'zsh-syntax-highlighting' | |
brew_install_or_upgrade 'brew-cask' | |
brew_cask_install_or_upgrade 'dropbox' | |
brew_cask_install 'google-chrome' | |
brew_cask_install_or_upgrade 'atom' | |
brew_cask_install_or_upgrade '1password' | |
brew_cask_install_or_upgrade 'android-studio' | |
brew_cask_install_or_upgrade 'evernote' | |
brew_cask_install_or_upgrade 'helium' | |
brew_cask_install_or_upgrade 'imagealpha' | |
brew_cask_install_or_upgrade 'imageoptim' | |
brew_cask_install_or_upgrade 'integrity' | |
brew_cask_install_or_upgrade 'iterm' | |
brew_cask_install_or_upgrade 'karabiner' | |
brew_cask_install_or_upgrade 'postman' | |
brew_cask_install_or_upgrade 'slack' | |
brew_cask_install_or_upgrade 'sourcetree' | |
brew_cask_install_or_upgrade 'textwrangler' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment