Skip to content

Instantly share code, notes, and snippets.

@svs14
Last active January 1, 2016 02:59
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/8082569 to your computer and use it in GitHub Desktop.
Save svs14/8082569 to your computer and use it in GitHub Desktop.
Bootstraps a fresh ArchLinux install with env-custom (dot files) and oh-my-zsh.
#!/bin/bash
#
# Bootstraps env-custom for ArchLinux machine
# 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 ~
# Update and install required ArchLinux packages
sudo pacman -S \
git curl zsh gvim tmux python base-devel 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