#! /bin/bash # This script will make a folder called 'Backups' in the users 'home' (~) folder # if it does not exist already and then make a backup of all flatpak software # with a time stamp prepended to the beginning of the file called # '_install_flatpaks.sh'. After this file is created, you can use it to # install (or re-install) all of your flatpaks. cd ~ mkdir -p ./Backups cd ./Backups tmp=$(flatpak list --app --columns=application | xargs echo -n) echo -e '#!/bin/bash'"\nflatpak install "$tmp > install_flatpaks.sh sudo chmod +x install_flatpaks.sh mv install_flatpaks.sh "$(date +%Y-%m-%d--%H-%M-%S)_install_flatpaks.sh" echo "Done!"