Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:00
What would you like to do?
run needed erlang version with kerl
# add this function to the .bashrc or .bash_profile
# change paths to your own paths. i recommend create a dedicated folder for otp versions
# Usage
#λ kunthar : erl_run
#checking installed versions in /Users/kunthar/development/erlang/kerl
#17.0 17.0-rc2 R15B01 R16B02 bash_completion kerl* releases zsh_completion
#versions will be listed from the same directory!!!
#select one my friend
. /Users/kunthar/development/erlang/kerl/17.0/activate #change the activation path too
function erl_run()
echo "checking installed versions in /Users/kunthar/development/erlang/kerl"
echo `ls -l /Users/kunthar/development/erlang/kerl | awk '{print $9}' | cut -f1 -d'/'`
echo "select one my friend"
read input_variable
if [ -z "$input_variable" ]
echo "$(tput setaf 3) Release 17.0 selected as default"
echo $(tput sgr 0)
. /Users/kunthar/development/erlang/kerl/17.0/activate
echo "$(tput setaf 2) Release $input_variable selected "
echo $(tput sgr 0)
. /Users/kunthar/development/erlang/kerl/$input_variable/activate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment