Skip to content

Commit

Permalink
improve grep (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
ipitio authored Apr 16, 2024
1 parent 85dab1c commit 30228af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion advanced/Scripts/updatecheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function get_local_version() {
cd "${1}" 2> /dev/null || return 1
local tags=$(git ls-remote -t origin)
local foundVersion=$(git rev-parse HEAD 2>/dev/null)
! grep -q "$foundVersion" <<<"$tags" || foundVersion=$(grep "$foundVersion" <<<"$tags" | awk '{print $2;}' | cut -d '/' -f 3 | sort -V | tail -n1)
! grep -q "^$foundVersion" <<<"$tags" || foundVersion=$(grep "^$foundVersion.*/v[0-9].*$" <<<"$tags" | awk '{print $2;}' | cut -d '/' -f 3 | sort -V | tail -n1)
echo "${foundVersion}"
}

Expand Down

0 comments on commit 30228af

Please sign in to comment.