From 0b604d898ec30ff9c0ffffb703f4641aa19dbdf9 Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Mon, 6 Jun 2022 17:39:21 +0300 Subject: [PATCH] Add install.sh --- install.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 install.sh diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..b1191c7 --- /dev/null +++ b/install.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +if [ ! -f /bin/zsh ] +then + echo "You need to install zsh." + exit 255 +fi + +if [ ! -d ~/.oh-my-zsh/ ] +then + echo "You need to install oh-my-zsh first." + read -p "Install (y/N)?: " INSTALL_OHMYZSH + if [[ $INSTALL_OHMYZSH == "n" || $INSTALL_OHMYZSH == "N" || $INSTALL_OHMYZSH == "" ]] + then + echo "Exiting" + exit 255 + fi +fi + +if [ -f $(which curl) ] +then + if [[ $INSTALL_OHMYZSH = "y" || $INSTALL_OHMYZSH = "Y" ]] + then + sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" + fi + curl -fsSL https://raw.githubusercontent.com/ivabus/ivabus-zsh-theme/master/ivabus.zsh-theme > ~/.oh-my-zsh/custom/themes/ivabus.zsh-theme + echo "Now you need to set ivabus as your ZSH_THEME in .zshrc" +fi \ No newline at end of file