Created
February 13, 2013 06:58
-
-
Save pnlybubbles/4942787 to your computer and use it in GitHub Desktop.
zsh環境整えるシェルスクリプトLion用
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 | |
echo "\033[1;36m===>\033[0;39m \033[1mInstalling homebrew\033[0;39m" | |
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" | |
echo "\033[1;36m===>\033[0;39m \033[1mInstalling tmux\033[0;39m" | |
brew install tmux | |
echo "\033[1;36m===>\033[0;39m \033[1mInstalling zsh\033[0;39m" | |
brew install zsh | |
echo "\033[1;36m===>\033[0;39m \033[1mEditing /etc/shells\033[0;39m" | |
sudo sh -c "echo '/usr/local/bin/zsh' >> /etc/shells" | |
echo "\033[1;36m===>\033[0;39m \033[1mChanging login shell\033[0;39m" | |
chpass -s /usr/local/bin/zsh | |
echo "\033[1;31m===>\033[0;39m \033[1mNow reboot (y/n)\033[0;39m" | |
while : | |
do | |
read ans | |
if [ $ans ] ; then | |
case "$ans" in | |
'y' ) echo "\033[1;36m===>\033[0;39m \033[1mInstall succeeded.\033[0;39m" | |
sleep 1 | |
sudo reboot | |
break ;; | |
'n' ) echo "\033[1;33m===>\033[0;39m \033[1mWARNING: you should reboot right now.\033[0;39m" | |
break ;; | |
* ) echo "\033[1;33m===>\033[0;39m \033[1mPlease type \"y\" or \"n\". \033[0;39m" ;; | |
esac | |
else | |
echo "\033[1;33m===>\033[0;39m \033[1mNo character input.\033[0;39m" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment