Skip to content

Instantly share code, notes, and snippets.

@Fleshgrinder
Last active Jun 19, 2019
Embed
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 'https://gist.githubusercontent.com/Fleshgrinder/b4411e49fb97f000d57b65755d49740c/raw/gradle'
chmod +x ~/bin/gradle
curl -Lo ~/bin/mvn 'https://gist.githubusercontent.com/Fleshgrinder/4dea4a703e850fed44b6a6fe47876237/raw/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