From bb266e30945d672fca76ba1679ebf8d2144ee36a Mon Sep 17 00:00:00 2001 From: constantin Date: Wed, 4 Sep 2024 15:30:06 +0200 Subject: [PATCH] refactor ig --- misc.sh | 3 ++- update.sh | 13 ++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/misc.sh b/misc.sh index cb9f0fe..68e434b 100644 --- a/misc.sh +++ b/misc.sh @@ -1,4 +1,5 @@ #!/bin/bash alias test='php bin/phpunit' -alias cover='php bin/phpunit --coverage-html=html-coverage' \ No newline at end of file +alias cover='php bin/phpunit --coverage-html=html-coverage' +alias cd='z' \ No newline at end of file diff --git a/update.sh b/update.sh index 55d7aca..7e5ca98 100755 --- a/update.sh +++ b/update.sh @@ -1,13 +1,16 @@ #!/bin/bash cd ~/.dotfiles +echo "Checking for dotfile updates..." git fetch if [ $(git rev-parse HEAD) == $(git rev-parse @{u}) ]; then - read -p "Dotfiles can be updated. Do you want to proceed? (y/n)" choice - case "$choice" in - y|Y ) echo "updating..." && git pull >> /dev/null && echo "updated";; - * ) echo "skipping";; - esac + read -p "Dotfiles can be updated. Do you want to proceed? (y/n)" choice + case "$choice" in + y|Y ) echo "Updating..." && git pull >> /dev/null && echo "Updated successfully";; + * ) echo "Skipping";; + esac +else + echo "Dotfiles are up-to-date" fi; \ No newline at end of file