2016-10-08 22:18:26 -07:00
|
|
|
#!/usr/bin/env bash
|
2014-10-10 04:00:19 -07:00
|
|
|
|
2013-04-01 01:31:41 +00:00
|
|
|
|
2014-08-25 22:46:00 -07: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-04-01 01:31:41 +00:00
|
|
|
function osx() {
|
2014-11-09 23:37:58 -08: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 22:46:00 -07:00
|
|
|
brew_for_multiple_users
|
2014-11-10 00:05:11 -08:00
|
|
|
brew doctor
|
2013-04-01 01:31:41 +00:00
|
|
|
brew update
|
|
|
|
brew install git
|
2014-10-10 04:00:19 -07:00
|
|
|
brew install python
|
2014-11-10 00:05:11 -08:00
|
|
|
sudo easy_install pip
|
2013-04-01 01:31:41 +00:00
|
|
|
}
|
|
|
|
|
2014-10-09 22:18:33 -07:00
|
|
|
function go() {
|
2014-10-10 04:37:30 -07:00
|
|
|
git clone https://github.com/IvanMalison/dotfiles.git --recursive
|
2014-10-09 22:18:33 -07:00
|
|
|
cd dotfiles
|
2016-10-08 22:18:26 -07:00
|
|
|
sudo pip install invoke
|
2014-10-10 04:00:19 -07:00
|
|
|
invoke setup
|
2014-10-09 22:18:33 -07:00
|
|
|
}
|
|
|
|
|
2014-10-10 04:00:19 -07:00
|
|
|
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
|
2013-04-01 01:31:41 +00:00
|
|
|
case `uname` in
|
|
|
|
'Darwin')
|
2015-11-25 11:15:31 -05:00
|
|
|
osx
|
|
|
|
;;
|
2013-04-01 01:31:41 +00:00
|
|
|
'Linux')
|
2015-11-25 11:15:31 -05:00
|
|
|
debian
|
2013-04-01 01:31:41 +00:00
|
|
|
;;
|
|
|
|
esac
|
2014-10-10 04:00:19 -07:00
|
|
|
|
2014-10-09 22:53:57 -07:00
|
|
|
go
|