feat: yafti module

This commit is contained in:
ER
2023-08-13 17:14:39 +03:00
parent b2034c7a1c
commit 290075c1c7

View File

@@ -3,4 +3,16 @@
# Tell build process to exit if there are any errors.
set -oue pipefail
echo "$1"
YAFTI_FILE="/usr/share/ublue-os/firstboot/yafti.yml"
get_yaml_array FLATPAKS '.custom-flatpaks[]' "$1"
if [[ ${#FLATPAKS[@]} -gt 0 ]]; then
echo "Adding Flatpaks to yafti.yml"
yq -i '.screens.applications.values.groups.Custom.description = "Flatpaks suggested by the image maintainer."' "${YAFTI_FILE}"
yq -i '.screens.applications.values.groups.Custom.default = true' "${YAFTI_FILE}"
for pkg in "${FLATPAKS[@]}"; do
echo "Adding to yafti: ${pkg}"
yq -i ".screens.applications.values.groups.Custom.packages += [$pkg]" "${YAFTI_FILE}"
done
fi