Fixed Issue with after_backup not completing

This commit is contained in:
René Fuhry 2023-04-04 10:36:58 +02:00 committed by GitHub
parent 832237903a
commit 9c92ced4bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

9
update
View File

@ -4,7 +4,7 @@
source "$HOME"/.config/update.conf
VER="2.0.2"
VER="2.0.3"
IGREEN="\033[0;92m" # Intense Green
IYELLOW="\033[0;93m" # Intense Red
NC="\033[0m" # Text Reset
@ -73,7 +73,7 @@ after_backup() {
tar -cJf "$TMP"/after-backup_"$DATE".tar.xz.new "$TMP"/after-backup_"$DATE" &> /dev/null
cp "$TMP"/after-backup_"$DATE".tar.xz.new "$BACKUP_LOCATION"
rename after-backup_"$DATE".tar.xz.new after-backup_"$DATE".tar.xz "$BACKUP_LOCATION"/after-backup_"$DATE".tar.xz.new
[[ $FINAL_COMMAND ]] && sleep 3s && $FINAL_COMMAND && exit 0
$FINAL_COMMAND
}
update_with_pacman_wrapper() {
@ -86,8 +86,6 @@ update_with_flatpak() {
flatpak list > "$TMP"/after-backup_"$DATE"/flatpak-after.txt
}
[[ -z $1 ]] && before_backup && echo -e "${IGREEN}pre-backup complete${NC}" && update_with_pacman_wrapper
if [[ ${1:0:2} = -- ]]; then
case "${1:2}" in
help)
@ -104,10 +102,11 @@ fi
before_backup && echo -e "${IGREEN}pre-backup complete${NC}"
[[ $1 ]] || update_with_pacman_wrapper
while getopts 'fpagr' OPTIONS; do
case $OPTIONS in
f)
update_with_flatpak;;
update_with_flatpak ;;
p)
update_with_pacman_wrapper ;;
a)