re-add functionality
This file is needed to restore preview and flatpak update functionality
This commit is contained in:
parent
81b07991aa
commit
e2d4253050
30
update.zsh
Normal file
30
update.zsh
Normal file
@ -0,0 +1,30 @@
|
||||
preview() {
|
||||
yay -Syy && yay -Qu
|
||||
[[ -x /usr/bin/flatpak ]] && flatpak remote-ls --updates
|
||||
}
|
||||
|
||||
flatpak-update() {
|
||||
TMP="/tmp/update"
|
||||
DATE="$(date +"%Y-%m-%dT%H:%M:%S%:z")"
|
||||
BACKUP_LOCATION="/opt"
|
||||
|
||||
[[ -d $TMP ]] && rm --recursive --force "$TMP"
|
||||
mkdir --parents "$TMP"/before-backup_"$DATE" "$TMP"/after-backup_"$DATE"
|
||||
|
||||
flatpak list --all --show-details > "$TMP"/before-backup_"$DATE"/flatpak-before.txt
|
||||
tar --create --zstd --file "$TMP"/before-backup_"$DATE".tar.zst "$TMP"/before-backup_"$DATE"
|
||||
|
||||
flatpak update --assumeyes
|
||||
|
||||
flatpak list --all --show-details > "$TMP"/after-backup_"$DATE"/flatpak-after.txt
|
||||
tar --create --zstd --file "$TMP"/after-backup_"$DATE".tar.zst "$TMP"/after-backup_"$DATE"
|
||||
|
||||
rsync -a "$TMP"/before-backup_"$DATE".tar.zst "$TMP"/after-backup_"$DATE".tar.zst "$BACKUP_LOCATION"
|
||||
|
||||
rm --recursive --force "$TMP"
|
||||
}
|
||||
|
||||
update () {
|
||||
yay
|
||||
flatpak-update
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user