Update backup-raveos.sh
This commit is contained in:
parent
66e9738ce8
commit
934db11121
1 changed files with 11 additions and 12 deletions
|
@ -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
|
||||
fi
|
Loading…
Reference in a new issue