Created
August 23, 2012 01:09
-
-
Save liamcurry/3431015 to your computer and use it in GitHub Desktop.
Bootstrap EC2
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
# curl -L https://raw.github.com/gist/3431015/bootstrap.sh | sh | |
USERNAME=$(id -un) | |
COMMON_PKGS="curl vim git zsh autojump tmux" | |
command_exists () { | |
type "$1" &> /dev/null ; | |
} | |
if command_exists apt-get ; then | |
sudo apt-get install $COMMON_PKGS | |
elif command_exists yum ; then | |
sudo yum install $COMMON_PKGS | |
elif command_exists brew ; then | |
brew install $COMMON_PKGS | |
elif command_exists port ; then | |
sudo port install $COMMON_PKGS | |
elif ! command_exists git -o ! command_exists zsh ; then | |
echo "Couldn't find a package manager, and git and zsh aren't both installed. Quitting..." | |
exit 2 | |
fi | |
git init | |
git remote add -t barebones -f origin git://github.com/liamcurry/dotfiles.git | |
git checkout barebones | |
git submodule update --init --force | |
git config status.showuntrackedfiles no | |
sudo chsh -s /usr/bin/zsh ${USERNAME} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment