bazzite/system_files/desktop/shared/usr/bin/ublue-flatpak-system-install

20 lines
695 B
Bash
Executable File

#!/usr/bin/env bash
if [[ -f '/etc/flatpak/install' ]]; then
cp -r /etc/flatpak/flathub/* /var/lib/flatpak/repo/refs/remotes/flathub
cp -r /etc/flatpak/objects/* /var/lib/flatpak/repo/objects
cat /etc/flatpak/install | while read line; do
flatpak install --system --noninteractive --no-pull flathub $line
done && mv /etc/flatpak/install /etc/flatpak/installed
fi
if [[ -f '/etc/flatpak/deck' ]]; then
if grep "deck" <<< $(rpm-ostree status); then
cat /etc/flatpak/deck | while read line; do
flatpak install --system --noninteractive --no-pull flathub $line
done && cat /etc/flatpak/deck >> /etc/flatpak/installed
fi
fi
rm -rf /etc/flatpak/{deck,flathub,objects}