diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 8e2888add..ea0f6d8cc 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -236,7 +236,12 @@ fn_fetch_file(){ fn_fetch_file_github(){ github_file_url_dir="${1}" github_file_url_name="${2}" - if [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + + if [ "${legacycheckversionfix}" == "1" ]; then + # For legacy versions - code can be removed at a future date + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + elif [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else diff --git a/lgsm/functions/core_legacy.sh b/lgsm/functions/core_legacy.sh index 520287ec8..4e1418fd7 100644 --- a/lgsm/functions/core_legacy.sh +++ b/lgsm/functions/core_legacy.sh @@ -6,6 +6,19 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +# This is to help the transition to v20.3.0 and above +if [ ! -f "${functionsdir}/check_version.sh" ]; then + legacy_versions_array=( v20.2.1 v20.2.0 v20.1.5 v20.1.4 v20.1.3 v20.1.2 v20.1.1 v20.1.0 v19.12.5 v19.12.4 v19.12.3 v19.12.2 v19.12.1 v19.12.0 ) + for legacy_version in "${legacy_versions_array[@]}" + do + if [ "${version}" == "${legacy_version}" ]; then + legacycheckversionfix=1 + github_file_url_dir="lgsm/functions" + fn_fetch_file_github "${github_file_url_dir}" "check_version.sh" "${functionsdir}" "nochmodx" "norun" "noforce" "nomd5" + fi + done +fi + if [ -z "${serverfiles}" ]; then legacymode=1 serverfiles="${filesdir}"