fix: loop over lines, functional var substitution

This commit is contained in:
ER
2023-04-02 15:31:01 +03:00
parent 9e827fe6be
commit 773fc23804

View File

@@ -4,7 +4,7 @@ rpm-ostree override remove firefox firefox-langpacks
echo "-- Installing RPMs defined in recipe.yml --"
rpm_packages=$(yq '.rpms[]' < /etc/ublue-recipe.yml)
for pkg in $rpm_packages; do \
for pkg in $(echo -e "$rpm_packages"); do \
echo "Installing: ${pkg}" && \
rpm-ostree install $pkg; \
done
@@ -17,6 +17,6 @@ pip install --prefix=/usr yafti
yq -i '.screens.applications.values.groups.Custom.description = "Flatpaks defined by the image maintainer"' /etc/yafti.yml
yq -i '.screens.applications.values.groups.Custom.default = true' /etc/yafti.yml
flatpaks=$(yq '.flatpaks[]' < /etc/ublue-recipe.yml)
for pkg in $flatpaks; do \
yq -i ".screens.applications.values.groups.Custom.packages += [{'$pkg': '$pkg'}]" /etc/yafti.yml
for pkg in $(echo -e "$flatpaks"); do \
yq -i ".screens.applications.values.groups.Custom.packages += [{\"$pkg\": \"$pkg\"}]" /etc/yafti.yml
done