Last active
August 29, 2015 14:14
-
-
Save percisely/0ce6270902cd91bac39d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
## run this first bit as root to avoid typing password | |
USR=Guest | |
sudo chown -R $USR "/System/Library/User Template/" | |
sudo mkdir /opt | |
sudo mkdir /opt/gem | |
sudo chown -R $USR /opt | |
sudo mkdir /usr/local | |
sudo curl -L https://github.com/Homebrew/homebrew/tarball/master | tar xz --strip 1 -C /usr/local | |
sudo chown -R $USR /usr/local | |
xcode-select --install | |
## now run the rest as Guest | |
curl -L https://github.com/epicodus/dot-files/archive/master.zip -o dot-files.zip | |
unzip dot-files.zip | |
rm dot-files.zip | |
cp -r ~/dot-files-master/ ~/ | |
source ~/.bash_profile | |
brew install git heroku-toolbelt postgres chruby ruby-install | |
ruby-install ruby 2.2.0 --rubies-dir /opt/rubies | |
source ~/.bash_profile | |
chruby 2.2 | |
gem install simple-git-pair | |
curl -L https://github.com/epicodus/pre-commit/archive/master.zip | tar xz --strip 1 -C /usr/local/share/git-core/templates/hooks/ | |
chmod 755 /usr/local/share/git-core/templates/hooks/pre-commit | |
curl -L https://atom.io/download/mac > ~/Downloads/atom-mac.zip | |
unzip ~/Downloads/atom-mac.zip -d /Applications/ | |
rm ~/Downloads/atom-mac.zip | |
open /Applications/Atom.app/ # installs shell commands | |
killall Atom | |
curl https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg > ~/Downloads/googlechrome.dmg | |
hdiutil attach ~/Downloads/googlechrome.dmg | |
cp -r /Volumes/Google\ Chrome/Google\ Chrome.app/ /Applications/Google\ Chrome.app | |
hdiutil detach /Volumes/Google\ Chrome | |
rm ~/Downloads/googlechrome.dmg | |
TEMPLATE="/System/Library/User Template/English.lproj" | |
tar cfz "$TEMPLATE.tar.gz" "$TEMPLATE" | |
cp -r ~/dot-files-master/ "$TEMPLATE" | |
chflags uchg "$TEMPLATE/Library/Preferences/" # prevents user setup script from changing it back | |
# configure postgres | |
PGDATA="$TEMPLATE/.postgres" | |
initdb -E UTF8 | |
pg_ctl -w start | |
createdb Guest | |
createuser -s Guest | |
pg_ctl stop | |
rm -rf ~/dot-files-master/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment