mirror of
https://github.com/ivabus/dotfiles
synced 2024-11-22 08:05:07 +03:00
Add reinstallation tool
This commit is contained in:
parent
9a3e34600f
commit
eae87382dd
3 changed files with 20 additions and 1 deletions
|
@ -45,4 +45,6 @@ if [[ $answer = [Yy] ]]; then
|
||||||
sh tools/git.sh
|
sh tools/git.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
chmod +x $HOME/.dotfiles/tools/*
|
||||||
|
|
||||||
exec zsh
|
exec zsh
|
12
tools/reinstall.sh
Normal file
12
tools/reinstall.sh
Normal file
|
@ -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)"
|
|
@ -9,7 +9,12 @@ CLEAR_COLOR="\033[0m"
|
||||||
|
|
||||||
cd $HOME/.dotfiles
|
cd $HOME/.dotfiles
|
||||||
echo "1) ${GREEN}Upgrading dotfiles$CLEAR_COLOR"
|
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
|
sh tools/relink.sh
|
||||||
echo "2) ${GREEN}Upgrading oh-my-zsh$CLEAR_COLOR"
|
echo "2) ${GREEN}Upgrading oh-my-zsh$CLEAR_COLOR"
|
||||||
zsh -c "source $ZSH/oh-my-zsh.sh && omz update" > /dev/null
|
zsh -c "source $ZSH/oh-my-zsh.sh && omz update" > /dev/null
|
||||||
|
|
Loading…
Reference in a new issue