Skip to content

Instantly share code, notes, and snippets.

@svs14
Created June 4, 2015 08:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save svs14/a265a59761ada0383cf0 to your computer and use it in GitHub Desktop.
Save svs14/a265a59761ada0383cf0 to your computer and use it in GitHub Desktop.
Bootstraps a fresh Ubuntu 14.04 install with env-custom (dot files) and oh-my-zsh.
#!/bin/bash
#
# Bootstraps env-custom for Ubuntu machine 14.04
# additionally with oh-my-zsh.
#
# Set bash to exit immediately on failure
set -e
# Set bash statements to return failure if any piped command within it fails
set -o pipefail
# Change directory to home
cd ~
# Setup PPA usage
sudo aptitude update && sudo aptitude -y install python-software-properties
# Update and install required Ubuntu packages
sudo aptitude update && sudo aptitude -y install \
git curl zsh vim tmux python python-dev build-essential cmake clang
# Retrieve env-custom
git clone https://github.com/sjenkz/dotfiles.git .env_custom
# Install oh-my-zsh
.env_custom/zsh/install-oh-my-zsh.sh || true
# Reconfigure zsh theme
sed -i 's/robbyrussell/nicoulaj/' .zshrc
# Disable correction
sed -i 's/# DISABLE_CORRECTION="true"/DISABLE_CORRECTION="true"/' .zshrc
# Install env-custom
.env_custom/install.sh
# Default shell to zsh
sudo chsh $USER -s $(which zsh) || true
# Notify success of installation
echo "Installation succeeded."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment