From 0cf6b13b6c44135848ae9a400b2fa3aa5aed657d Mon Sep 17 00:00:00 2001 From: ER Date: Sun, 2 Apr 2023 12:24:32 +0300 Subject: [PATCH] feat: yafti package group for recipe.yml read .flatpaks[] in recipe.yml and add declared packages to their own package group in yafti --- build.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 897789e..a50e526 100644 --- a/build.sh +++ b/build.sh @@ -10,4 +10,12 @@ done echo "---" # install yafti to install flatpaks on first boot, https://github.com/ublue-os/yafti -pip install --prefix=/usr yafti \ No newline at end of file +pip install --prefix=/usr yafti + +# add a package group for yafti using the packages defined in recipe.yml +yq -iy '.screens.applications.values.groups.Custom.description = "Flatpaks defined by the image maintainer"' /etc/yafti.yml +yq -iy '.screens.applications.values.groups.Custom.default = true' /etc/yafti.yml +flatpaks=$(yq '.flatpaks[]' < /etc/ublue-recipe.yml) +for pkg in $flatpaks; do \ + yq -iy ".screens.applications.values.groups.Custom.packages += [{'$pkg': '$pkg'}]" /etc/yafti.yml \ +done