From 2ee033b84f8cb0d744ad53c8ba5cc9c82e7f8a9f Mon Sep 17 00:00:00 2001 From: H0mire Date: Sat, 4 May 2024 16:46:18 +0200 Subject: [PATCH] added greeting --- update-dots.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/update-dots.sh b/update-dots.sh index 113628ba..19e6631b 100644 --- a/update-dots.sh +++ b/update-dots.sh @@ -26,6 +26,29 @@ function file_in_excludes() { return 1 } + +# Greetings! +echo "###################################################################################################" +echo "| |" +echo "| Welcome to the dotfiles updater script! |" +echo "| |" +echo "| This script will update your dotfiles (.config, .local, etc) by retrieving the latest version |" +echo "| from the Git repository and then replacing files that have not been modified |" +echo "| by you to preserve changes. |" +echo "| |" +echo "###################################################################################################" + +echo "Do you want to continue? [Y/n] " +read -r +echo +if [[ $REPLY =~ ^[Nn]$ ]]; then + echo "Exiting." + exit 0 +fi + +# End of Greetings + + current_branch=$(git rev-parse --abbrev-ref HEAD) # fetch the latest version of the repository