From 8ffcd27af06d7a7c9c455cd123b81f0fed79d91d Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Tue, 5 Jul 2022 08:15:27 +0300 Subject: [PATCH] Change visuals --- tools/git.sh | 22 +++++++++++----------- tools/install.sh | 12 +++++++----- tools/mac.sh | 4 ++-- tools/relink.sh | 6 +++--- tools/upgrade.sh | 6 +++--- 5 files changed, 26 insertions(+), 24 deletions(-) diff --git a/tools/git.sh b/tools/git.sh index be21ed8..eeeeae7 100644 --- a/tools/git.sh +++ b/tools/git.sh @@ -2,9 +2,9 @@ GREEN="\033[32m" RED="\033[31m" -DEFAULTC="\033[0m" +CLEAR_COLOR="\033[0m" -echo "${GREEN}Setting up git$DEFAULTC" +echo "${GREEN}Setting up git$CLEAR_COLOR" read -p "Enter your name for commits: " GITNAME git config --global user.name "$GITNAME" read -p "Enter your email for commits: " GITEMAIL @@ -30,17 +30,17 @@ then fi git config --global core.editor $GITEDITOR -echo "\n${RED}Git configured with:$DEFAULTC" -echo "${GREEN}user.name: ${DEFAULTC}$GITNAME" -echo "${GREEN}user.email: ${DEFAULTC}$GITEMAIL" -echo "${GREEN}core.editor: ${DEFAULTC}$GITEDITOR" -echo "${GREEN}pull.rebase: ${DEFAULTC}false (merge)" +echo "\n${RED}Git configured with:$CLEAR_COLOR" +echo "${GREEN}user.name: ${CLEAR_COLOR}$GITNAME" +echo "${GREEN}user.email: ${CLEAR_COLOR}$GITEMAIL" +echo "${GREEN}core.editor: ${CLEAR_COLOR}$GITEDITOR" +echo "${GREEN}pull.rebase: ${CLEAR_COLOR}false (merge)" if [[ $answer = [Yy] ]] then -echo "${GREEN}commit.codesign: ${DEFAULTC}true" -echo "${GREEN}gpg.program: ${DEFAULTC}gpg2" -echo "${GREEN}user.signingkey: ${DEFAULTC}$GPGKEYID" +echo "${GREEN}commit.codesign: ${CLEAR_COLOR}true" +echo "${GREEN}gpg.program: ${CLEAR_COLOR}gpg2" +echo "${GREEN}user.signingkey: ${CLEAR_COLOR}$GPGKEYID" else -echo "${GREEN}commit.codesign: ${DEFAULTC}false" +echo "${GREEN}commit.codesign: ${CLEAR_COLOR}false" fi \ No newline at end of file diff --git a/tools/install.sh b/tools/install.sh index fb121f7..c75d526 100644 --- a/tools/install.sh +++ b/tools/install.sh @@ -3,9 +3,9 @@ CURRENTDIR="$(pwd)" GREEN="\033[32m" RED="\033[31m" -DEFAULTC="\033[0m" +CLEAR_COLOR="\033[0m" -echo "${GREEN}Welcome to ivabus .dotfiles installer$DEFAULTC" +echo "${GREEN}Welcome to ivabus .dotfiles installer$CLEAR_COLOR" echo "Dotfiles will be installed to $HOME/.dotfiles" echo "Press enter to continue" read A @@ -15,12 +15,12 @@ read A if ! command -v zsh > /dev/null then echo "zsh is not installed" - echo "${RED}Aborting.$DEFAULTC" + echo "${RED}Aborting.$CLEAR_COLOR" exit 255 fi # install oh-my-zsh and plugins - +echo "${GREEN}Installing oh-my-zsh and plugins$CLEAR_COLOR" ZSH="$HOME/.dotfiles/oh-my-zsh" sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended > /dev/null curl -fsSL https://raw.githubusercontent.com/ivabus/ivabus-zsh-theme/master/ivabus.zsh-theme -o $HOME/.dotfiles/oh-my-zsh/custom/themes/ivabus.zsh-theme > /dev/null git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.dotfiles/oh-my-zsh/custom/plugins/zsh-syntax-highlighting > /dev/null @@ -28,6 +28,8 @@ git clone https://github.com/zsh-users/zsh-autosuggestions $HOME/.dotfiles/oh-my # linking dotfiles to their original locations +echo "${GREEN}Linking binaries$CLEAR_COLOR" + sh $HOME/.dotfiles/tools/relink.sh cd $CURRENTDIR @@ -37,7 +39,7 @@ then sh tools/mac.sh fi -echo "${GREEN}Dotfiles installed and linked.$DEFAULTC" +echo "${GREEN}Dotfiles installed and linked.$CLEAR_COLOR" read -p "Would you like to configure git? (y/N): " answer if [[ $answer = [Yy] ]]; then sh tools/git.sh diff --git a/tools/mac.sh b/tools/mac.sh index d13bd8f..6b482b6 100644 --- a/tools/mac.sh +++ b/tools/mac.sh @@ -2,13 +2,13 @@ GREEN="\033[32m" RED="\033[31m" -DEFAULTC="\033[0m" +CLEAR_COLOR="\033[0m" # configuring mac-only things # installing homebrew -echo "${GREEN}Installing Homebrew${DEFAULTC}" +echo "${GREEN}Installing Homebrew${CLEAR_COLOR}" /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" if [ "$(arch)" == "arm64" ] diff --git a/tools/relink.sh b/tools/relink.sh index 26561c1..99556d4 100644 --- a/tools/relink.sh +++ b/tools/relink.sh @@ -4,11 +4,11 @@ # do not run manually GREEN="\033[32m" -DEFAULTC="\033[0m" +CLEAR_COLOR="\033[0m" mkdir -p $HOME/.config/nvim >/dev/null 2>&1 rm $HOME/.zshrc $HOME/.config/nvim/init.vim >/dev/null 2>&1 ln -s $HOME/.dotfiles/zshrc $HOME/.zshrc -echo "${GREEN}.zshrc linked: $DEFAULTC$HOME/.dotfiles/zshrc $GREEN-> $DEFAULTC$HOME/.zshrc" +echo "${GREEN}.zshrc linked: $CLEAR_COLOR$HOME/.dotfiles/zshrc $GREEN-> $CLEAR_COLOR$HOME/.zshrc" ln -s $HOME/.dotfiles/nvim.vim $HOME/.config/nvim/init.vim -echo "${GREEN}neovim config linked: $DEFAULTC$HOME/.dotfiles/nvim.vim $GREEN-> $DEFAULTC$HOME/.config/nvim/init.vim" +echo "${GREEN}neovim config linked: $CLEAR_COLOR$HOME/.dotfiles/nvim.vim $GREEN-> $CLEAR_COLOR$HOME/.config/nvim/init.vim" diff --git a/tools/upgrade.sh b/tools/upgrade.sh index fdc0fd5..534dc50 100644 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -5,12 +5,12 @@ CURRENTDIR="$(pwd)" GREEN="\033[32m" -DEFAULTC="\033[0m" +CLEAR_COLOR="\033[0m" cd $HOME/.dotfiles -echo "${GREEN}Upgrading dotfiles$DEFAULTC" +echo "1) ${GREEN}Upgrading dotfiles$CLEAR_COLOR" git pull sh tools/relink.sh -echo "${GREEN}Upgrading oh-my-zsh$DEFAULTC" +echo "2) ${GREEN}Upgrading oh-my-zsh$CLEAR_COLOR" zsh -c "source $ZSH/oh-my-zsh.sh && omz update" > /dev/null cd $CURRENTDIR \ No newline at end of file