BR script finished, probably

This commit is contained in:
RP1 2025-02-12 08:33:07 +01:00
parent af936433ea
commit 3330f689a5

View file

@ -107,11 +107,11 @@ if [[ $user_choice = *"BACKUP All of My Data and Settings"* ]]; then
if [[ $Desktop == GNOME ]]; then if [[ $Desktop == GNOME ]]; then
# GNOME SECTION # GNOME SECTION
echo ${bold}${yellow}GNOME Detected - Updating GNOME Program Pkg${normal} echo ${bold}${yellow}GNOME Detected - Dumping Dconf${normal}
dconf dump / > $FOLDER/$USER-ui dconf dump / > $FOLDER/$USER-ui
else else
# KDE Section # KDE Section
echo ${bold}${yellow}KDE Detected - Updating GNOME Program Pkg${normal} echo ${bold}${yellow}KDE Detected - Saving Konsave${normal}
konsave -s raveui-kde -f konsave -s raveui-kde -f
rsync -ap --info=progress2 /home/$USER/.config/konsave $FOLDER/.config rsync -ap --info=progress2 /home/$USER/.config/konsave $FOLDER/.config
mkdir -p $FOLDER/.local/state mkdir -p $FOLDER/.local/state
@ -124,23 +124,30 @@ if [[ $user_choice = *"BACKUP All of My Data and Settings"* ]]; then
fi fi
if [[ $user_choice = *"Restore all of my data and settings"* ]]; then if [[ $user_choice = *"Restore all of my data and settings"* ]]; then
Locale=$(locale | grep "LANG" -c) Locale=$(locale | grep "LANG")
Desktop=$XDG_CURRENT_DESKTOP Desktop=$XDG_CURRENT_DESKTOP
echo echo
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}
rsync -ap --info=progress2 $FOLDER /home/$USER/
sudo rsync -ap --info=progress2 $FOLDER/etc/libvirt /etc/ sudo rsync -ap --info=progress2 $FOLDER/etc/libvirt /etc/
sudo rsync -ap --info=progress2 $FOLDER/usr/share/jellyfin/web/config.json /usr/share/jellyfin/web/ sudo rsync -ap --info=progress2 $FOLDER/usr/share/jellyfin/web/config.json /usr/share/jellyfin/web/
rsync -ap --info=progress2 $FOLDER/.local/state/dolphinstaterc /home/$USER/.local/state/ rsync -ap --info=progress2 $FOLDER /home/$USER/
dconf load / < $FOLDER/$USER-ui
konsave -a raveui-kde
if [[ $Desktop == GNOME ]]; then
# GNOME SECTION
echo ${bold}${yellow}GNOME Detected - Loading Dconf${normal}
dconf load / < $FOLDER/$USER-ui
else
# KDE Section
echo ${bold}${yellow}KDE Detected - Loading Konsave${normal}
rsync -ap --info=progress2 $FOLDER/.local/state/dolphinstaterc /home/$USER/.local/state/
konsave -a raveui-kde
fi
echo ----------------------------------------------------- echo -----------------------------------------------------
sudo chown -R $USER:$GROUP /home/$USER/ sudo chown -R $USER:$GROUP /home/$USER/
echo echo
echo ${bold}${yellow}$USER settings RESTORED! ${normal} echo ${bold}${yellow}$USER settings RESTORED! ${normal}
fi fi
exit exit 1