feat: Add support for using %OS_VERSION% in install url

This commit is contained in:
Gerald Pinder 2024-06-11 14:26:02 -04:00
parent a6d0d23c29
commit ce30cc9684

View file

@ -37,8 +37,9 @@ get_yaml_array REMOVE '.remove[]' "$1"
if [[ ${#INSTALL[@]} -gt 0 ]]; then
for PKG in "${INSTALL[@]}"; do
if [[ "$PKG" =~ ^https?:\/\/.* ]]; then
echo "Installing directly from URL: ${PKG}"
rpm-ostree install "$PKG"
REPLACED_PKG="${PKG//%OS_VERSION%/${OS_VERSION}}"
echo "Installing directly from URL: ${REPLACED_PKG}"
rpm-ostree install "$REPLACED_PKG"
INSTALL=( "${INSTALL[@]/$PKG}" ) # delete URL from install array
fi
done