diff --git a/advanced/Scripts/speedtestmod/mod.sh b/advanced/Scripts/speedtestmod/mod.sh index d8e047e734..b2ff446893 100755 --- a/advanced/Scripts/speedtestmod/mod.sh +++ b/advanced/Scripts/speedtestmod/mod.sh @@ -82,8 +82,11 @@ download() { grep -q "$desiredVersion$" <<<"$tags" && desiredVersion=$(grep "$desiredVersion$" <<<"$tags" | awk '{print $1;}') || desiredVersion=$currentVersion fi - git fetch origin --depth=1 $desiredVersion -q - git -c advice.detachedHead=false checkout $desiredVersion -q + if [ "$(git rev-parse HEAD)" != "$desiredVersion" ]; then + git fetch origin --depth=1 $desiredVersion -q + git reset --hard $desiredVersion -q + fi + cd .. }