-
-
Save milosmrda/72a8ac481043135e04faf64a766b07ab to your computer and use it in GitHub Desktop.
Backup flatpaks (and re-install them)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /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!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment