fix: use yq in setup-flatpaks

This commit is contained in:
ER
2023-03-04 16:35:18 +02:00
parent 8b389d5f04
commit 66d22650f0

View File

@@ -25,12 +25,10 @@ distrobox-ubuntu:
setup-flatpaks:
echo 'Installing flatpaks from the ublue recipe ...'
flatpaks=$(dasel -f /etc/ublue-recipe.yml -r yaml -w json -s 'flatpaks')
flatpaks_count=$(echo $flatpaks | dasel -r json -s 'len()')
for i in $(seq 0 $(($flatpaks_count-1))); do
pkg=$(echo $flatpaks | dasel -r json "[${i}]" | tr -d '"')
echo "# Installing ${pkg}"
flatpak install --user --noninteractive flathub $pkg
flatpaks=$(yq '.flatpaks[]' < /etc/ublue-recipe.yml)
for pkg in $flatpaks; do \
echo "Installing: ${pkg}" && \
flatpak install --user --noninteractive flathub $pkg; \
done
setup-pwa: