From efbd416607d610bfab1688ee95176e0d3cc9cda0 Mon Sep 17 00:00:00 2001 From: "Gareth J. Greenaway" Date: Fri, 14 Apr 2023 05:46:31 -0700 Subject: [PATCH] parse json first, since different versions have different naming schemes and we need to parse that part afterwards --- bootstrap-salt.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 60778cd..7a749dc 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -8479,6 +8479,9 @@ __macosx_get_packagesite_onedir() { __PY_VERSION_REPO="py3" fi + if [ "$(echo "$_ONEDIR_REV" | grep -E '^(latest)$')" != "" ]; then + _ONEDIR_REV=$(__parse_repo_json_python) + fi if [ "$(echo "$_ONEDIR_REV" | grep -E '^(3005)$')" != "" ]; then PKG="salt-${_ONEDIR_REV}-macos-${DARWIN_ARCH}.pkg" else @@ -8487,9 +8490,6 @@ __macosx_get_packagesite_onedir() { else UNSIGNED="" fi - if [ "$(echo "$_ONEDIR_REV" | grep -E '^(latest)$')" != "" ]; then - _ONEDIR_REV=$(__parse_repo_json_python) - fi PKG="salt-${_ONEDIR_REV}-${__PY_VERSION_REPO}-${DARWIN_ARCH}${UNSIGNED}.pkg" fi SALTPKGCONFURL="https://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/macos/${_ONEDIR_REV}/${PKG}"