1
1
Fork 0
dotfiles/zsh/install.sh
2019-08-04 15:52:01 -05:00

39 lines
1.2 KiB
Bash

#!/bin/bash
echo "🤔 Checking for Zsh installation"
if zsh --version; then
echo "🥰 Zsh is already installed"
else
echo "🤩 Installing Zsh"
sudo apt-get install zsh
echo "👍 Zsh Installed"
fi
echo "🦄 Setting Zsh as default shell"
sudo chsh -s /usr/bin/zsh
echo "👍 Zsh set as default shell, will take effect next time you log in (or type zsh into your terminal)"
echo "🤔 Checking for oh-my-zsh installation"
if [ -d ~/.oh-my-zsh ]; then
echo "🥰 oh-my-zsh is already installed"
else
echo "🤩 Installing oh-my-zsh"
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo "👍 oh-my-zsh Installed"
fi
echo "🤔 Checking for zsh-autosuggestions installation"
if [ -d ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions ]; then
echo "🥰 zsh-autosuggestions is already installed"
else
echo "🤩 Installing zsh-autosuggestions"
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
echo "👍 zsh-autosuggestions Installed"
fi
echo "🦄 Symlinking Zsh configuration"
rm ~/.zshrc
ln -s ~/dotfiles/zsh/.zshrc ~/.zshrc
echo "👍 Symlinked Zsh configuration"
source ~/.zshrc
echo "👍 Sourced updated zshrc"