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