Skip to content

Instantly share code, notes, and snippets.

@Fleshgrinder
Last active June 19, 2019 20:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fleshgrinder/dd19ccd6ab90621ab1c3fd5d9d11e26b to your computer and use it in GitHub Desktop.
Save Fleshgrinder/dd19ccd6ab90621ab1c3fd5d9d11e26b to your computer and use it in GitHub Desktop.
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