fix(rpm-ostree): %OS_VERSION% not properly substituted for URL when doing install only

Fixes: #342
This commit is contained in:
fiftydinar 2024-10-12 17:46:13 +02:00 committed by GitHub
parent 4d53e8159b
commit 8124abbdd0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -69,9 +69,9 @@ LOCAL_INSTALL=false
if [[ ${#INSTALL_PKGS[@]} -gt 0 ]]; then
for PKG in "${INSTALL_PKGS[@]}"; do
if [[ "${PKG}" =~ ^https?:\/\/.* ]]; then
VERSION_SUBSTITUTED_PKG="${PKG//%OS_VERSION%/${OS_VERSION}}"
PKG="${PKG//%OS_VERSION%/${OS_VERSION}}"
HTTPS_INSTALL=true
HTTPS_PKGS+=("${VERSION_SUBSTITUTED_PKG}")
HTTPS_PKGS+=("${PKG}")
elif [[ ! "${PKG}" =~ ^https?:\/\/.* ]] && [[ -f "${CONFIG_DIRECTORY}/rpm-ostree/${PKG}" ]]; then
LOCAL_INSTALL=true
LOCAL_PKGS+=("${CONFIG_DIRECTORY}/rpm-ostree/${PKG}")