From 5f5c29bcb8dd93bf7a0d4ad79b42db6ac2b4cd9f Mon Sep 17 00:00:00 2001 From: H0mire Date: Sat, 4 May 2024 11:13:07 +0200 Subject: [PATCH] now with current branch --- update-dots.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update-dots.sh b/update-dots.sh index 3a4218ea8..ddb3eea8f 100644 --- a/update-dots.sh +++ b/update-dots.sh @@ -26,6 +26,7 @@ function file_in_excludes() { return 1 } +current_branch=$(git rev-parse --abbrev-ref HEAD) # fetch the latest version of the repository if ! git fetch; then @@ -34,7 +35,7 @@ if ! git fetch; then fi # Check if there are any changes -if [[ $(git rev-list HEAD...origin/main --count) -eq 0 ]]; then +if [[ $(git rev-list HEAD...origin/$current_branch --count) -eq 0 ]]; then echo "No changes found. Exiting." exit 0 fi @@ -188,5 +189,4 @@ for folder in "${folders[@]}"; do fi fi done -done - +done \ No newline at end of file