Skip to content

Instantly share code, notes, and snippets.

@uetchy
Created December 3, 2014 13:36
Show Gist options
  • Save uetchy/eb625f922eff16eb404b to your computer and use it in GitHub Desktop.
Save uetchy/eb625f922eff16eb404b to your computer and use it in GitHub Desktop.
brew-smash
#!/bin/sh
# Usage: brew smash app-name
if [ -z "$1" ] ; then
echo "Usage: brew smash app-name"
exit 1
fi
if [ ! -d "Casks" ] ; then
KEEP_CLEAN=true
else
KEEP_CLEAN=false
fi
HOMEBREW_CACHE=. brew cask fetch "$1"
if [ "$KEEP_CLEAN" = true ] ; then
rm -r "Casks"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment