Created
January 20, 2015 08:01
-
-
Save joonaspessi/c2b529a62e9e1b3b689f to your computer and use it in GitHub Desktop.
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
#!/bin/zsh | |
# | |
# This script installs prezto into a vagrant/*nix box which already has zsh and oh-my-zsh | |
# installed. It also replaces the prompt color and enables the git prezto module. If | |
# executed via the suggested command below, also the default shell is changed into zsh. | |
# BTW, if using this for a vagrant box, be sure to execute the command while ssh'd into | |
# the box. | |
# | |
# Usage: curl -L https://raw-gist-file-address-here.sh | zsh && chsh -s $(which zsh) | |
# | |
echo "Cloning prezto" | |
rm -rf "${ZDOTDIR:-$HOME}/.zprezto" | |
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto" | |
echo "Symlinking all requires zsh dot files" | |
setopt EXTENDED_GLOB | |
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do | |
targetfile=${ZDOTDIR:-$HOME}/.${rcfile:t} | |
rm -f "$targetfile" | |
ln -s "$rcfile" "$targetfile" | |
done | |
echo "Include git prezto module" | |
sed -i "s/'prompt'/'prompt' 'git'/" ${ZDOTDIR:-$HOME}/.zpreztorc | |
echo "All done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment