From 934db1112196c59227e8891f4d0fa46333aff3c9 Mon Sep 17 00:00:00 2001 From: RP1 Date: Tue, 18 Mar 2025 10:26:52 +0000 Subject: [PATCH] Update backup-raveos.sh --- backup-raveos.sh | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/backup-raveos.sh b/backup-raveos.sh index fd8e65a..a05c123 100644 --- a/backup-raveos.sh +++ b/backup-raveos.sh @@ -1,5 +1,8 @@ #!/bin/bash +Locale=$(locale | grep "LANG" -c) +Desktop=$XDG_CURRENT_DESKTOP + # Text modifiers bold=$(tput bold) # ${bold} normal=$(tput sgr0) # ${normal} @@ -31,8 +34,6 @@ sudo echo if [[ $user_choice = *"BACKUP All of My Data and Settings"* ]]; then cd - Locale=$(locale | grep "LANG" -c) - Desktop=$XDG_CURRENT_DESKTOP echo echo ----------------------------------------------------- echo Copying ${bold}${yellow}$USER Settings and Files${normal} into ${bold}${yellow}$FOLDER/${normal} @@ -161,21 +162,21 @@ if [[ $user_choice = *"BACKUP All of My Data and Settings"* ]]; then echo ${bold}${yellow} BACKUP SCRIPT FINISHED SUCCESSFULLY! ${normal} fi -if [[ $user_choice = *"Restore all of my data and settings"* ]]; then - Locale=$(locale | grep "LANG") - Desktop=$XDG_CURRENT_DESKTOP +if [[ $user_choice = *"RESTORE All of My Data and Settings"* ]]; then echo echo ----------------------------------------------------- - echo Copying ${bold}${yellow}Restoring $USER Settings and Files ${normal} into ${bold}${yellow}$FOLDER/${normal} + echo Copying ${bold}${yellow}Restoring - $USER - Settings and Files ${normal} into ${bold}${yellow}$FOLDER/${normal} - sudo rsync -ap --info=progress2 $FOLDER/etc/libvirt /etc/ - sudo rsync -ap --info=progress2 $FOLDER/config.json /usr/share/jellyfin/web/ - rsync -ap --info=progress2 $FOLDER /home/$USER/ + sudo rsync -ap --info=progress2 $FOLDER/etc/libvirt /etc/ 2>/dev/null + sudo rsync -ap --info=progress2 $FOLDER/config.json /usr/share/jellyfin/web/ 2>/dev/null + sudo rsync -ap --info=progress2 $FOLDER /home/$USER/ if [[ $Desktop == GNOME ]]; then # GNOME SECTION echo ${bold}${yellow}GNOME Detected - Loading Dconf${normal} dconf load / < $FOLDER/$USER-ui + echo + echo ${bold}${yellow} Dconf loaded${normal} else # KDE Section echo ${bold}${yellow}KDE Detected - Loading Konsave${normal} @@ -186,6 +187,4 @@ if [[ $user_choice = *"Restore all of my data and settings"* ]]; then sudo chown -R $USER:$GROUP /home/$USER/ echo echo ${bold}${yellow}SETTINGS RESTORED SUCCESSFULLY! ${normal} -fi - -exit 1 \ No newline at end of file +fi \ No newline at end of file