Last active
August 29, 2015 13:58
-
-
Save msykiino/9987205 to your computer and use it in GitHub Desktop.
Macにhomebrewでrbenvをインストールする
This file contains 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
#!/bin/bash | |
#set -x | |
VER=2.1.1 | |
trap 'echo -e "\nabort: signal trapped\n"; exit 1' 1 2 3 15 | |
echo | |
echo "Starting..." | |
echo | |
brew update | |
brew upgrade | |
brew install openssl | |
brew install readline | |
brew install rbenv | |
brew install ruby-build | |
brew install rbenv-gemset | |
brew install rbenv-gem-rehash | |
brew list -l | |
test ! -f ~/.rbenvrc && echo 'eval "$(rbenv init -)"' >> ~/.rbenvrc | |
if [ ! -d "/usr/lib64" ]; then | |
sudo mkdir /usr/lib64 | |
sudo chmod 2775 /usr/lib64 | |
sudo chown root:admin /usr/lib64 | |
fi | |
cat <<_EOT_ | |
rbenv install -l | |
rbenv install $VER | |
rbenv global $VER | |
rbenv rehash | |
rbenv versions | |
rbenv version | |
_EOT_ | |
echo | |
echo "Finished." | |
echo | |
echo "Do not forget to reload [ ~/.bashrc ]." | |
echo | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment