Last active
August 29, 2015 14:07
-
-
Save cristobal/451cc8630501feb19b46 to your computer and use it in GitHub Desktop.
Brew Get Home Path for a FORMULA
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
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