diff --git a/tools/install.sh b/tools/install.sh index 7c11920..6c64b8d 100644 --- a/tools/install.sh +++ b/tools/install.sh @@ -45,4 +45,6 @@ if [[ $answer = [Yy] ]]; then sh tools/git.sh fi +chmod +x $HOME/.dotfiles/tools/* + exec zsh \ No newline at end of file diff --git a/tools/reinstall.sh b/tools/reinstall.sh new file mode 100644 index 0000000..eabfd85 --- /dev/null +++ b/tools/reinstall.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +GREEN="\033[32m" +RED="\033[31m" +CLEAR_COLOR="\033[0m" + +echo "${RED}Reinstalling dotfiles${CLEAR_COLOR}" +echo "To proceed press enter" +read A + +rm -rf $HOME/.dotfiles +sh -c "$(curl -fsSL https://ivabus.dev/dotfiles)" \ No newline at end of file diff --git a/tools/upgrade.sh b/tools/upgrade.sh index 1a2753d..033d186 100644 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -9,7 +9,12 @@ CLEAR_COLOR="\033[0m" cd $HOME/.dotfiles echo "1) ${GREEN}Upgrading dotfiles$CLEAR_COLOR" -git pull > /dev/null 2>&1 +if git pull > /dev/null 2>&1 +then + echo "$HOME/.dotfiles synced" +else + echo "$HOME/.dotfiles couldn't be 'git pull'ed, check your connection to internet or run tools/reinstall.sh" + exit 1 sh tools/relink.sh echo "2) ${GREEN}Upgrading oh-my-zsh$CLEAR_COLOR" zsh -c "source $ZSH/oh-my-zsh.sh && omz update" > /dev/null