2023-11-10 21:12:15 +00:00
|
|
|
# ------------------------------------------------------
|
|
|
|
# Install .bashrc
|
|
|
|
# ------------------------------------------------------
|
2023-11-12 13:16:53 +00:00
|
|
|
cat <<"EOF"
|
|
|
|
_ _
|
|
|
|
| |__ __ _ ___| |__ _ __ ___
|
|
|
|
| '_ \ / _` / __| '_ \| '__/ __|
|
|
|
|
_| |_) | (_| \__ \ | | | | | (__
|
|
|
|
(_)_.__/ \__,_|___/_| |_|_| \___|
|
|
|
|
|
|
|
|
EOF
|
2023-11-10 21:12:15 +00:00
|
|
|
|
|
|
|
while true; do
|
2023-11-12 13:16:53 +00:00
|
|
|
if [ -f ~/.bashrc ]; then
|
|
|
|
echo "The script has detected an existing .bashrc file. "
|
|
|
|
fi
|
|
|
|
if [ -f ~/dotfiles-versions/backups/$datets/.bashrc-old ]; then
|
|
|
|
echo "Backup is available here ~/dotfiles-versions/backups/$datets/.bashrc-old"
|
|
|
|
fi
|
|
|
|
if [ -f ~/.bashrc ]; then
|
|
|
|
echo "Do you want to replace your existing .bashrc file with the dotfiles .bashrc file?"
|
|
|
|
else
|
|
|
|
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]* )
|
|
|
|
echo "Installation skipped."
|
|
|
|
break;;
|
|
|
|
* ) echo "Please answer yes or no.";;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
echo ""
|