Skip to content

Instantly share code, notes, and snippets.

@cristobal
Last active August 29, 2015 14:07
Show Gist options
  • Save cristobal/451cc8630501feb19b46 to your computer and use it in GitHub Desktop.
Save cristobal/451cc8630501feb19b46 to your computer and use it in GitHub Desktop.
Brew Get Home Path for a FORMULA
function brew_get_home_path_formula {
echo $(brew info ${1} | grep -E -o "/usr/local/Cellar/${1}/(\d+\.?)+")
}
## i.e. set GRADLE_HOME in .bashrc
export GRADLE_HOME=$(brew_get_home_path_formula gradle)/libexec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment