2023-11-10 21:12:15 +00:00
|
|
|
# ------------------------------------------------------
|
|
|
|
# Install .bashrc
|
|
|
|
# ------------------------------------------------------
|
2023-11-17 12:48:02 +00:00
|
|
|
echo -e "${GREEN}"
|
2023-11-12 13:16:53 +00:00
|
|
|
cat <<"EOF"
|
|
|
|
_ _
|
|
|
|
| |__ __ _ ___| |__ _ __ ___
|
|
|
|
| '_ \ / _` / __| '_ \| '__/ __|
|
|
|
|
_| |_) | (_| \__ \ | | | | | (__
|
|
|
|
(_)_.__/ \__,_|___/_| |_|_| \___|
|
|
|
|
|
|
|
|
EOF
|
2023-11-17 12:48:02 +00:00
|
|
|
echo -e "${NONE}"
|
2023-11-10 21:12:15 +00:00
|
|
|
while true; do
|
2023-11-17 12:48:02 +00:00
|
|
|
if [ ! -L ~/.bashrc ] && [ -f ~/.bashrc ]; then
|
|
|
|
echo "PLEASE NOTE AGAIN: The script has detected an existing .bashrc file."
|
2023-11-12 13:16:53 +00:00
|
|
|
fi
|
|
|
|
if [ -f ~/dotfiles-versions/backups/$datets/.bashrc-old ]; then
|
2023-11-17 12:48:02 +00:00
|
|
|
echo "Backup is already available here ~/dotfiles-versions/backups/$datets/.bashrc-old"
|
2023-11-12 13:16:53 +00:00
|
|
|
fi
|
2023-11-17 12:48:02 +00:00
|
|
|
if [ ! -L ~/.bashrc ] && [ -f ~/.bashrc ]; then
|
|
|
|
echo ""
|
2023-11-12 13:16:53 +00:00
|
|
|
echo "Do you want to replace your existing .bashrc file with the dotfiles .bashrc file?"
|
|
|
|
else
|
2023-11-17 12:48:02 +00:00
|
|
|
echo ""
|
2023-11-12 13:16:53 +00:00
|
|
|
echo "Do you want to install the dotfiles .bashrc file now?"
|
|
|
|
fi
|
|
|
|
read -p "Please confirm (Yy/Nn): " yn
|
2023-11-10 21:12:15 +00:00
|
|
|
case $yn in
|
|
|
|
[Yy]* )
|
|
|
|
_installSymLink .bashrc ~/.bashrc ~/dotfiles/.bashrc ~/.bashrc
|
|
|
|
break;;
|
|
|
|
[Nn]* )
|
2023-11-17 12:48:02 +00:00
|
|
|
echo "Installation of the .bashrc file skipped."
|
2023-11-10 21:12:15 +00:00
|
|
|
break;;
|
|
|
|
* ) echo "Please answer yes or no.";;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
echo ""
|