2023-11-10 16:12:15 -05:00
|
|
|
# ------------------------------------------------------
|
|
|
|
# Install .bashrc
|
|
|
|
# ------------------------------------------------------
|
2023-12-22 03:17:34 -05:00
|
|
|
|
2023-11-17 07:48:02 -05:00
|
|
|
echo -e "${GREEN}"
|
2023-12-21 15:57:44 -05:00
|
|
|
figlet ".bashrc"
|
2023-11-17 07:48:02 -05:00
|
|
|
echo -e "${NONE}"
|
2023-11-21 15:19:51 -05:00
|
|
|
if [ ! -L ~/.bashrc ] && [ -f ~/.bashrc ]; then
|
2023-12-22 03:17:34 -05:00
|
|
|
echo "PLEASE NOTE: The script has detected an existing .bashrc file."
|
2023-11-21 15:19:51 -05:00
|
|
|
fi
|
|
|
|
if [ -f ~/dotfiles-versions/backups/$datets/.bashrc-old ]; then
|
|
|
|
echo "Backup is already available here ~/dotfiles-versions/backups/$datets/.bashrc-old"
|
|
|
|
fi
|
2024-05-27 11:30:11 -04:00
|
|
|
echo
|
2023-11-21 15:19:51 -05:00
|
|
|
if [ ! -L ~/.bashrc ] && [ -f ~/.bashrc ]; then
|
2024-05-07 15:44:14 -04:00
|
|
|
bash_confirm="Do you want to replace your existing .bashrc file with the ML4W dotfiles .bashrc file?"
|
2023-12-22 03:17:34 -05:00
|
|
|
if gum confirm "$bash_confirm" ;then
|
|
|
|
rm ~/.bashrc
|
|
|
|
_installSymLink .bashrc ~/.bashrc ~/dotfiles/.bashrc ~/.bashrc
|
|
|
|
elif [ $? -eq 130 ]; then
|
|
|
|
exit 130
|
|
|
|
else
|
|
|
|
echo "Installation of the .bashrc file skipped."
|
|
|
|
fi
|
2023-11-21 15:19:51 -05:00
|
|
|
else
|
2024-05-07 15:44:14 -04:00
|
|
|
bash_confirm="Do you want to install the ML4W dotfiles .bashrc file now?"
|
2023-12-22 03:17:34 -05:00
|
|
|
if gum confirm "$bash_confirm" ;then
|
|
|
|
if [ -L ~/.bashrc ] || [ -f ~/.bashrc ]; then
|
|
|
|
rm ~/.bashrc
|
|
|
|
echo "Existing .bashrc removed."
|
|
|
|
fi
|
|
|
|
_installSymLink .bashrc ~/.bashrc ~/dotfiles/.bashrc ~/.bashrc
|
|
|
|
elif [ $? -eq 130 ]; then
|
|
|
|
exit 130
|
|
|
|
else
|
|
|
|
echo "Installation of the .bashrc file skipped."
|
|
|
|
fi
|
2023-11-21 15:19:51 -05:00
|
|
|
fi
|
2023-11-10 16:12:15 -05:00
|
|
|
echo ""
|