helm/deploy
2013-03-22 16:27:49 -04:00

104 lines
3 KiB
Bash
Executable file
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
GREEN=$(tput setaf 2)
RS=$(tput sgr0)
src=$(dirname "$BASH_SOURCE")
INSTALL_DIR="~/.dotfiles"
##### GIT & DOTFILES ######
# If the install folder doesn't exist, you bash < <(curl ...)'d this script!
if [ ! -d $src/install ]; then
# Check for git and install it if necessary
if ! command_exists git; then
echo "==> GIT isn't installed!"
echo "==> Installing GIT"
pkg-install git
# https://github.com/jamiew/git-friendly
bash < <(curl https://raw.github.com/jamiew/git-friendly/master/install.sh)
fi
# Get the dotfiles
echo "==> Cloning dotfiles repo"
git clone https://github.com/hlissner/dotfiles.git "$INSTALL_DIR"
do_link "$INSTALL_DIR/gitconfig" ~/.gitconfig
do_link "$INSTALL_DIR/gitignore" ~/.gitignore
fi
source "$INSTALL_DIR/zsh/functions"
###### DEPENDENCIES #######
if is_mac; then
# Set up the OSX options
$src/install/osx
# Detect homebrew; install it if necessary
if ! command_exists brew; then
echo-g "==> Installing Homebrew"
# http://mxcl.github.com/homebrew/
ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
# Reregister the PATH so bash sees brew and its minions
PATH=/usr/local/bin:/usr/local/sbin:$PATH
# Install GNU core utilities (those that come with OS X are outdated)
brew install coreutils
# echo "Dont forget to add $(brew --prefix coreutils)/libexec/gnubin to \$PATH."
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
brew install findutils
# Install Bash 4
brew install bash
# Install wget with IRI support
brew install wget --enable-iri
# Install more recent versions of some OS X tools
brew tap homebrew/dupes
brew install homebrew/dupes/grep
brew tap josegonzalez/homebrew-php
# Install everything else
brew install macvim --override-system-vim --with-cscope
brew install vim --with-ruby --with-python
brew install ack git rename tree node nginx memcached ctags
brew install php54 --with-fpm --with-imap --with-mysql --with-pgsql --without-apache
brew install php54-imagick php54-mcrypt php54-xdebug readline
echo-g "==> Homebrew: Updating"
brew update && brew upgrade
echo-g "==> Homebrew: Cleaning up"
brew cleanup
else
echo-r "==> Homebrew is already installed!"
fi
elif is_linux; then
ehco-g "==> Installing dependencies"
pkg-install curl python ruby wget zsh
echo-g "==> Aptitude: Updating"
pkg-update
echo-g "==> Aptitude: Cleaning up"
pkg-clean
fi
# Install & setup ZSH shell
$src/install/zsh
# Install RVM & setup 1.8.7, 1.9.2 rubies
$src/install/rvm
# Install & setup TMUX
$src/install/tmux
# Install & setup VIM
$src/install/vim
# Wrap things up
echo
echo-g "Done!"
echo "And if you want to install vim, run:"
echo " sh <(curl https://raw.github.com/hlissner/mlvim/master/install.sh -L)"