add missing check for flatpak
This commit is contained in:
parent
a8eee49762
commit
e86a004a28
5
update
5
update
@ -79,7 +79,7 @@ before_backup() {
|
||||
mkdir --parents "$TMP"/before-backup_"$DATE" "$TMP"/after-backup_"$DATE"
|
||||
|
||||
pacman --verbose --query > "$TMP"/before-backup_"$DATE"/pacman-before.txt
|
||||
[[ -f /usr/bin/flatpak ]] && flatpak list --all --show-details > "$TMP"/before-backup_"$DATE"/flatpak-before.txt
|
||||
[[ -x /usr/bin/flatpak ]] && flatpak list --all --show-details > "$TMP"/before-backup_"$DATE"/flatpak-before.txt
|
||||
|
||||
tar --create --zstd --file "$TMP"/before-backup_"$DATE".tar.zst.new "$TMP"/before-backup_"$DATE" /var/lib/pacman/local > /dev/null 2>&1 # for some reason it needs the output suppresion
|
||||
mv "$TMP"/before-backup_"$DATE".tar.zst.new "$BACKUP_LOCATION"
|
||||
@ -90,7 +90,7 @@ before_backup() {
|
||||
|
||||
after_backup() {
|
||||
pacman --verbose --query > "$TMP"/after-backup_"$DATE"/pacman-after.txt
|
||||
flatpak list --all --show-details > "$TMP"/after-backup_"$DATE"/flatpak-after.txt
|
||||
[[ -x /usr/bin/flatpak ]] && flatpak list --all --show-details > "$TMP"/after-backup_"$DATE"/flatpak-after.txt
|
||||
tar --create --zstd --file "$TMP"/after-backup_"$DATE".tar.zst.new "$TMP"/after-backup_"$DATE" > /dev/null 2>&1
|
||||
|
||||
mv "$TMP"/after-backup_"$DATE".tar.zst.new "$BACKUP_LOCATION"
|
||||
@ -128,6 +128,7 @@ if [[ ${1:0:2} == \-\- ]]; then
|
||||
before_backup
|
||||
delete_oldest_backup before-backup
|
||||
mv "$BACKUP_LOCATION"/before-backup_"$DATE".tar.zst.new "$BACKUP_LOCATION"/before-backup_"$DATE".tar.zst
|
||||
[[ $SECONDARY_BACKUP_LOCATION ]] && mv "$SECONDARY_BACKUP_LOCATION"/before-backup_"$DATE".tar.zst.new "$SECONDARY_BACKUP_LOCATION"/before-backup_"$DATE".tar.zst
|
||||
rm --recursive --force "$TMP" ;;
|
||||
?)
|
||||
help; exit 1;;
|
||||
|
Loading…
Reference in New Issue
Block a user