From 18728ab3093ade50ec05f8b0d664956ff85778ed Mon Sep 17 00:00:00 2001 From: csimonis Date: Fri, 6 Sep 2024 08:31:54 +0200 Subject: [PATCH] add sourcing after update --- update.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/update.sh b/update.sh index c7aca86..84ec837 100755 --- a/update.sh +++ b/update.sh @@ -4,13 +4,16 @@ cd ~/.dotfiles echo "Checking for dotfile updates..." git fetch -if [ $(git rev-parse HEAD) != $(git rev-parse @{u}) ] +if [ $(git rev-parse HEAD) == $(git rev-parse @{u}) ] then if [ "$1" == -y ] then echo "Updating..." git pull >> /dev/null echo "Updated successfully" + echo "Sourcing new changes..." + source ./source + echo "Sourced new changes successfully" else read -p "Dotfiles can be updated. Do you want to proceed? (y/n) " choice if [ "$choice" = "y" ] @@ -18,8 +21,11 @@ then echo "Updating..." git pull >> /dev/null echo "Updated successfully" + echo "Sourcing new changes..." + source ./source + echo "Sourced new changes successfully" fi fi else echo "Dotfiles are up-to-date" -fi \ No newline at end of file +fi