2013-03-31 19:31:41 -06:00
|
|
|
#!/bin/bash
|
2014-10-10 05:00:19 -06:00
|
|
|
function fedora() {
|
|
|
|
yum install make automake gcc gcc-c++ kernel-devel
|
|
|
|
yum install
|
|
|
|
yum install python-pip
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-03-31 19:31:41 -06:00
|
|
|
function debian() {
|
2014-10-10 17:06:01 -06:00
|
|
|
local INSTALL_COMMAND='sudo apt-get -y install'
|
2013-03-31 19:31:41 -06:00
|
|
|
hash apt-get &>/dev/null || (echo 'apt-get is missing.' && exit)
|
2014-10-10 19:54:49 -06:00
|
|
|
$INSTALL_COMMAND build-essential git python python-dev python-pip
|
2013-03-31 19:31:41 -06:00
|
|
|
}
|
|
|
|
|
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() {
|
2014-11-10 00:37:58 -07:00
|
|
|
xcode-select --install
|
|
|
|
hash brew &>/dev/null && echo "brew found" || ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
2014-08-25 23:46:00 -06:00
|
|
|
brew_for_multiple_users
|
2014-11-10 01:05:11 -07:00
|
|
|
brew doctor
|
2013-03-31 19:31:41 -06:00
|
|
|
brew update
|
|
|
|
brew install git
|
2014-10-10 05:00:19 -06:00
|
|
|
brew install python
|
2014-11-10 01:05:11 -07:00
|
|
|
sudo easy_install pip
|
2013-03-31 19:31:41 -06:00
|
|
|
}
|
|
|
|
|
2014-10-09 23:18:33 -06:00
|
|
|
function go() {
|
2014-10-10 05:37:30 -06:00
|
|
|
git clone https://github.com/IvanMalison/dotfiles.git --recursive
|
2014-10-09 23:18:33 -06:00
|
|
|
cd dotfiles
|
2014-10-31 18:07:28 -06:00
|
|
|
sudo pip install invoke dotfiles
|
2014-10-10 05:00:19 -06:00
|
|
|
invoke setup
|
2014-10-09 23:18:33 -06:00
|
|
|
}
|
|
|
|
|
2014-10-10 05:00:19 -06:00
|
|
|
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
|
2013-03-31 19:31:41 -06:00
|
|
|
case `uname` in
|
|
|
|
'Darwin')
|
|
|
|
osx
|
|
|
|
;;
|
|
|
|
'Linux')
|
|
|
|
debian
|
|
|
|
;;
|
|
|
|
esac
|
2014-10-10 05:00:19 -06:00
|
|
|
|
2014-10-09 23:53:57 -06:00
|
|
|
go
|