Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ipitio committed Apr 27, 2024
1 parent fb49060 commit 31e914d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions advanced/Scripts/speedtestmod/mod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ getVersion() {
if [[ -d "$1" ]]; then
pushd "$1" &>/dev/null || exit 1
found_version=$(git status --porcelain=2 -b | grep branch.oid | awk '{print $3;}')
[[ $found_version != "*(*" ]] || found_version=$(git rev-parse HEAD 2>/dev/null)
[[ $found_version != *"("* ]] || found_version=$(git rev-parse HEAD 2>/dev/null)

if [[ -z "${2:-}" ]]; then
local tags
Expand All @@ -41,7 +41,7 @@ getVersion() {
if [[ "$found_version" != *.* ]]; then
local found_branch
found_branch="$(git status --porcelain=2 -b | grep branch.head | awk '{print $3;}')"
[[ $found_branch != "*(*" ]] || found_branch=$(git show-ref --heads | grep "$(git rev-parse HEAD)" | awk '{print $2;}' | cut -d '/' -f 3)
[[ $found_branch != *"("* ]] || found_branch=$(git show-ref --heads | grep "$(git rev-parse HEAD)" | awk '{print $2;}' | cut -d '/' -f 3)
[[ "$found_version" != "$found_branch" ]] || found_version=$(cut -d ' ' -f 7 <<<"$versions")
fi
fi
Expand Down
6 changes: 3 additions & 3 deletions advanced/Scripts/updatecheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function get_local_branch() {
cd "${1}" 2> /dev/null || return 1
local foundBranch
foundBranch=$(git status --porcelain=2 -b | grep branch.head | awk '{print $3;}')
[[ $foundBranch != "*(*" ]] || foundBranch=$(git show-ref --heads | grep "$(git rev-parse HEAD)" | awk '{print $2;}' | cut -d '/' -f 3)
[[ $foundBranch != *"("* ]] || foundBranch=$(git show-ref --heads | grep "$(git rev-parse HEAD)" | awk '{print $2;}' | cut -d '/' -f 3)
echo "${foundBranch:-HEAD}"
}

Expand All @@ -24,7 +24,7 @@ function get_local_version() {
local foundVersion
tags=$(git ls-remote -t origin || git show-ref --tags)
foundVersion=$(git status --porcelain=2 -b | grep branch.oid | awk '{print $3;}')
[[ $foundVersion != "*(*" ]] || foundVersion=$(git rev-parse HEAD 2>/dev/null)
[[ $foundVersion != *"("* ]] || foundVersion=$(git rev-parse HEAD 2>/dev/null)
local foundTag=$foundVersion
# shellcheck disable=SC2015
grep -q "^$foundVersion" <<<"$tags" && foundTag=$(grep "^$foundVersion.*/v[0-9].*$" <<<"$tags" | awk '{print $2;}' | cut -d '/' -f 3 | sort -V | tail -n1) || :
Expand All @@ -35,7 +35,7 @@ function get_local_version() {
function get_local_hash() {
cd "${1}" 2> /dev/null || return 1
foundHash=$(git status --porcelain=2 -b | grep branch.oid | awk '{print $3;}')
[[ $foundHash != "*(*" ]] || foundHash=$(git rev-parse HEAD 2>/dev/null)
[[ $foundHash != *"("* ]] || foundHash=$(git rev-parse HEAD 2>/dev/null)
echo "${foundHash}"
}

Expand Down

0 comments on commit 31e914d

Please sign in to comment.