Last active
August 29, 2015 14:25
-
-
Save Elijen/84f90cca4eb2720dbb32 to your computer and use it in GitHub Desktop.
webdev's shell script for fast re-install after a drive format (OS X)
This file contains 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
#!/bin/bash | |
# This script installs and configures 3rd party apps that are not available from App Store | |
# and does small OS tweak such as changing Terminal promt or removing default Dock icons. | |
# Tested for OS X Yosemite 10.10.4 | |
# install command line tools | |
xcode-select --install | |
if [ `xcode-select -p` != 0 ] | |
then | |
echo "Command-line tools must be installed, run the script again when the installation is done" | |
exit 1 | |
fi | |
# install Homebrew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
###### | |
# PHP | |
###### | |
# install PHP 5.5 with APC | |
brew tap homebrew/homebrew-php | |
brew install php55 | |
brew install php55-apcu | |
# set timezone to Europe/Prague | |
sudo sed -i.tmp s/";date.timezone ="/"date.timezone = Europe\/Prague"/ /usr/local/etc/php/5.5/php.ini | |
# install Composer | |
brew install composer | |
#### | |
# JavaScript | |
#### | |
# install Node.js | |
brew install nodejs | |
# install Bower and Grunt (globally) | |
npm install -g bower | |
npm install -g grunt-cli | |
####################### | |
# CSS preprocessors | |
####################### | |
# SCSS/SASS | |
sudo gem install compass && ln -s /usr/bin/compass /usr/local/bin/compass | |
# LESS | |
npm install -g less | |
########### | |
# More apps | |
########### | |
brew install caskroom/cask/brew-cask | |
brew cask install java | |
brew cask install google-chrome | |
brew cask install intellij-idea | |
brew cask install dropbox | |
brew cask install skype | |
brew cask install android-studio | |
########## | |
# Misc | |
########## | |
# install Git from Homebrew | |
brew install git | |
# install Dock manager | |
brew install dockutil | |
# remove all pinned apps from Dock | |
dockutil --remove all | |
# TODO add input sources and configure CMD+SHIFT/ALT+SHIFT hotkeys | |
# advanced bash completion | |
brew install bash-completion && cat >> ~/.bash_profile <<- EOM | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi | |
EOM | |
# show git branch in prompt | |
cat >> ~/.bash_profile <<- EOM | |
export PS1="\\w \[\e[0;36m\][\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)]\[\e[0m\] \$ " | |
EOM | |
# reset audio drivers | |
alias fixsound="sudo kextunload /System/Library/Extensions/AppleHDA.kext && sudo kextload /System/Library/Extensions/AppleHDA.kext" | |
brew install docker | |
brew install boot2docker | |
brew cask install sshfs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment