Fixed Issue with after_backup not completing
This commit is contained in:
parent
832237903a
commit
9c92ced4bb
9
update
9
update
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
source "$HOME"/.config/update.conf
|
source "$HOME"/.config/update.conf
|
||||||
|
|
||||||
VER="2.0.2"
|
VER="2.0.3"
|
||||||
IGREEN="\033[0;92m" # Intense Green
|
IGREEN="\033[0;92m" # Intense Green
|
||||||
IYELLOW="\033[0;93m" # Intense Red
|
IYELLOW="\033[0;93m" # Intense Red
|
||||||
NC="\033[0m" # Text Reset
|
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
|
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"
|
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
|
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() {
|
update_with_pacman_wrapper() {
|
||||||
@ -86,8 +86,6 @@ update_with_flatpak() {
|
|||||||
flatpak list > "$TMP"/after-backup_"$DATE"/flatpak-after.txt
|
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
|
if [[ ${1:0:2} = -- ]]; then
|
||||||
case "${1:2}" in
|
case "${1:2}" in
|
||||||
help)
|
help)
|
||||||
@ -104,10 +102,11 @@ fi
|
|||||||
|
|
||||||
before_backup && echo -e "${IGREEN}pre-backup complete${NC}"
|
before_backup && echo -e "${IGREEN}pre-backup complete${NC}"
|
||||||
|
|
||||||
|
[[ $1 ]] || update_with_pacman_wrapper
|
||||||
while getopts 'fpagr' OPTIONS; do
|
while getopts 'fpagr' OPTIONS; do
|
||||||
case $OPTIONS in
|
case $OPTIONS in
|
||||||
f)
|
f)
|
||||||
update_with_flatpak;;
|
update_with_flatpak ;;
|
||||||
p)
|
p)
|
||||||
update_with_pacman_wrapper ;;
|
update_with_pacman_wrapper ;;
|
||||||
a)
|
a)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user