Skip to content

Commit

Permalink
fix get_local_branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ipitio committed Apr 16, 2024
1 parent db002a4 commit 22e081b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions advanced/Scripts/updatecheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
function get_local_branch() {
# Return active branch
cd "${1}" 2> /dev/null || return 1
git rev-parse --abbrev-ref HEAD || return 1
local foundBranch=$(git show-ref --heads | grep "$(git rev-parse HEAD)" | awk '{print $2;}' | cut -d '/' -f 3)
echo "${foundBranch:-HEAD}"
}

function get_local_version() {
Expand All @@ -36,7 +37,6 @@ function get_remote_version() {
fi
}


function get_remote_hash(){
git ls-remote "https://github.com/arevindh/${1}" --tags "${2}" | awk '{print substr($0, 0,8);}' || { git ls-remote "https://github.com/pi-hole/${1}" --tags "${2}" | awk '{print substr($0, 0,8);}' || return 1; }
}
Expand Down

0 comments on commit 22e081b

Please sign in to comment.