install-script: get 'TAG' var back from master-v1

This commit is contained in:
iwilltry42 2020-05-18 07:36:08 +02:00
parent ed554c0cd6
commit 2c24f3df43
No known key found for this signature in database
GPG Key ID: 7BA57AD1CFF16110

View File

@ -75,6 +75,11 @@ checkK3dInstalledVersion() {
fi fi
} }
# checkTagProvided checks whether TAG has provided as an environment variable so we can skip checkLatestVersion.
checkTagProvided() {
[[ ! -z "$TAG" ]]
}
# checkLatestVersion grabs the latest version string from the releases # checkLatestVersion grabs the latest version string from the releases
checkLatestVersion() { checkLatestVersion() {
local latest_release_url="$REPO_URL/releases/latest" local latest_release_url="$REPO_URL/releases/latest"
@ -178,7 +183,7 @@ set +u
initArch initArch
initOS initOS
verifySupported verifySupported
checkLatestVersion checkTagProvided || checkLatestVersion
if ! checkK3dInstalledVersion; then if ! checkK3dInstalledVersion; then
downloadFile downloadFile
installFile installFile