add install script

This commit is contained in:
Santiago Forero 2021-08-23 17:22:44 -05:00
parent 60fd1dff24
commit 5b7f114af6
1 changed files with 44 additions and 0 deletions

44
tools/install.sh Executable file
View File

@ -0,0 +1,44 @@
programs=("git" "zsh")
echo "
\e[0;94m
______
| ___|
| |_ ___ _ __ ___ _ __ ___
| _/ _ \| '__/ _ \ '__/ _ \
| || (_) | | | __/ | | (_) |
\_| \___/|_| \___|_| \___/
Dotfiles installation script.
Github: https://github.com/forerosantiago/dotfiles/
"
read -p "$* This script will delete all your previous dotfiles, please back up first, then run this script, are you sure you want to continue? [Y/n] " yn
if [[ $yn == n* ]]; then
echo "Installation aborted."
exit 0
fi
cd
rm -rf dotfiles
git clone https://github.com/forerosantiago/dotfiles/
echo
echo "----------------------------------------------------------------------"
for i in "${programs[@]}"
do
read -p "$* :: Instal $i dotfiles? [Y/n] " yn
if [[ $yn == y* ]]; then
stow $i
fi
done