Skip to content

Instantly share code, notes, and snippets.

Last active Jun 19, 2019
What would you like to do?
How to install jEnv on a Mac with Maven and Gradle wrapper support.
#!/usr/bin/env bash
set -Eeuo pipefail
brew install gradle jenv mvn
mkdir -p ~/bin
curl -Lo ~/bin/gradle ''
chmod +x ~/bin/gradle
curl -Lo ~/bin/mvn ''
chmod +x ~/bin/mvn
echo '# jenv {{{
export JENV_ROOT=/usr/local/opt/jenv
export PATH="${JENV_ROOT}:${PATH}"
eval "$(jenv init -)"
# }}}
# ~~~~ always keep this last ~~~~
export PATH="~/bin:${PATH}"' >> ~/.shrc
echo 'source .shrc' >> ~/.bashrc
echo 'source .shrc' >> ~/.zshrc
echo 'Please reload your shell!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment