Skip to content

Instantly share code, notes, and snippets.

@getsueineko
Last active December 12, 2021 18:11
Show Gist options
  • Save getsueineko/c8a1a223a8b8b759ff16902af718bf8c to your computer and use it in GitHub Desktop.
Save getsueineko/c8a1a223a8b8b759ff16902af718bf8c to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Quick setup my zsh
# set -Eeuo pipefail
# MultiOS block
if [[ $(cat /etc/os-release | grep ID_LIKE) == *"debian"* ]]; then
echo -e "\nDebian-based system\n"
sudo apt update
sudo apt install git zsh fzf thefuck wget -y
elif [[ $(cat /etc/os-release | grep ID_LIKE) == *"centos"* ]]; then
echo -e "\nCentos-based system\n"
sudo dnf install git zsh wget tar util-linux-user -y
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
cd ~/.fzf/
./install
cd ~
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo -e "\nmacOS system\n"
brew update
brew install git fzf thefuck wget -y
else
echo -e "\nWARNING! This script doesn't work with your OS\n"
exit 1
fi
# Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Switch to zsh
chsh -s $(which zsh)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment