2013-03-31 19:31:41 -06:00
|
|
|
#!/bin/bash
|
|
|
|
function debian() {
|
|
|
|
hash apt-get &>/dev/null || (echo 'apt-get is missing.' && exit)
|
|
|
|
sudo apt-get -y install build-essential
|
|
|
|
sudo apt-get -y install git
|
|
|
|
}
|
|
|
|
|
2014-08-25 23:46:00 -06:00
|
|
|
function brew_for_multiple_users() {
|
|
|
|
sudo chgrp -R admin /usr/local
|
|
|
|
sudo chmod -R g+w /usr/local
|
|
|
|
sudo chgrp -R admin /Library/Caches/Homebrew
|
|
|
|
sudo chmod -R g+w /Library/Caches/Homebrew
|
|
|
|
}
|
|
|
|
|
2013-03-31 19:31:41 -06:00
|
|
|
function osx() {
|
|
|
|
hash gcc &>/dev/null
|
|
|
|
if [ $? -ne 0 ]
|
|
|
|
then
|
|
|
|
echo "gcc not found."
|
|
|
|
exit
|
|
|
|
fi
|
2013-11-22 11:52:22 -07:00
|
|
|
hash brew &>/dev/null && echo "brew found" || ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
|
2014-08-25 23:46:00 -06:00
|
|
|
brew_for_multiple_users
|
2013-03-31 19:31:41 -06:00
|
|
|
brew update
|
|
|
|
brew install git
|
|
|
|
}
|
|
|
|
|
|
|
|
case `uname` in
|
|
|
|
'Darwin')
|
|
|
|
osx
|
|
|
|
;;
|
|
|
|
'Linux')
|
|
|
|
debian
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
git clone git@github.com:IvanMalison/dotfiles.git
|
|
|
|
cd dotfiles
|
2014-08-25 21:31:11 -06:00
|
|
|
./setup.sh -e
|