2013-03-30 19:03:43 -06:00
|
|
|
#!/bin/bash
|
2013-03-17 16:46:42 -06:00
|
|
|
# Go to the source directory of this script.
|
2013-03-17 03:33:15 -06:00
|
|
|
cd "$(dirname "${BASH_SOURCE}")"
|
|
|
|
|
2013-03-18 10:56:29 -06:00
|
|
|
function install_essentials() {
|
|
|
|
case `uname` in
|
|
|
|
'Darwin')
|
|
|
|
hash gcc &>/dev/null
|
|
|
|
if [ $? -ne 0 ]
|
|
|
|
then
|
|
|
|
echo "gcc not found."
|
|
|
|
exit
|
|
|
|
case `sw_vers | grep ProductVersion | awk '{print $2}' | awk 'BEGIN{FS="."}{print $2}'` in
|
|
|
|
'8')
|
|
|
|
echo 'Mountain Lion Detected.'
|
|
|
|
;;
|
|
|
|
'7')
|
|
|
|
echo 'Lion Detected.'
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
exit -1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
else
|
|
|
|
echo "gcc found."
|
|
|
|
source ~/.osx
|
|
|
|
fi
|
|
|
|
hash brew &>/dev/null && echo "brew found." || ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
|
|
|
|
source .brew
|
|
|
|
;;
|
|
|
|
'Linux')
|
2013-03-30 20:32:10 -06:00
|
|
|
echo "Linux detected."
|
2013-03-30 20:48:10 -06:00
|
|
|
hash apt-get &>/dev/null || (echo 'apt-get is missing.' && exit)
|
2013-03-30 20:32:10 -06:00
|
|
|
echo "apt-get found."
|
2013-03-30 23:52:40 -06:00
|
|
|
sudo apt-get -y install build-essential
|
|
|
|
sudo apt-get -y install git
|
2013-03-30 23:54:22 -06:00
|
|
|
sudo git clone git@github.com:IvanMalison/dotfiles.git
|
2013-03-30 17:57:38 -06:00
|
|
|
cd dotfiles
|
|
|
|
source .debian
|
2013-03-18 10:56:29 -06:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Operating System not recognized; aborting."
|
2013-03-17 03:33:15 -06:00
|
|
|
exit
|
2013-03-18 10:56:29 -06:00
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
2013-03-19 04:03:01 -06:00
|
|
|
function install_python_packages() {
|
|
|
|
sudo -v
|
|
|
|
source ~/.path
|
|
|
|
easy_install pip
|
|
|
|
pip install -r requirements.txt
|
|
|
|
}
|
|
|
|
|
2013-03-17 03:33:15 -06:00
|
|
|
|
2013-03-18 10:56:29 -06:00
|
|
|
echo "Installing Dot Files."
|
|
|
|
source bootstrap.sh
|
2013-03-17 21:27:33 -06:00
|
|
|
echo "Installing Tmux Configuration."
|
2013-03-17 03:33:15 -06:00
|
|
|
tmux-powerline/generate_conf.sh
|
2013-03-17 21:27:33 -06:00
|
|
|
echo "Installing oh-my-zsh."
|
2013-03-19 04:32:49 -06:00
|
|
|
oh-my-zsh/install.sh -f
|