Created
February 14, 2015 17:03
-
-
Save tanitanin/b6dec25b5bbc777d4910 to your computer and use it in GitHub Desktop.
Install script for scala version manager
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
#!/usr/bin/env bash | |
do_svm_install() { | |
svm_path=$HOME/.svm | |
if [[ ! -d "$svm_path" ]]; then | |
echo "Making directory $svm_path" | |
mkdir -p $svm_path | |
fi | |
if [[ ! -e "$svm_path/bin/.git" ]]; then | |
echo "Get svm from github.com/yuroyoro/svm.git" | |
git clone https://github.com/yuroyoro/svm $svm_path/bin | |
fi | |
} | |
set_svm_path_to_bashrc() { | |
echo "Adding PATH to .bashrc" | |
echo " | |
# For scala version manager | |
export PATH=\$HOME/.svm/bin:\$PATH | |
if [[ -d \"\$HOME/.svm/current/rt\" ]]; then | |
export SCALA_HOME=\$HOME/.svm/current/rt | |
export PATH=\$SCALA_HOME/bin:\$PATH | |
fi" >> $HOME/.bashrc | |
} | |
do_svm_install | |
set_svm_path_to_bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment