This commit is contained in:
Stephan Raabe 2024-03-17 10:47:38 +01:00
parent b4e291cc74
commit 001527ba1c
4 changed files with 33 additions and 23 deletions

View File

@ -8,7 +8,7 @@ monitorrestored=0
_showRestoreOptions() { _showRestoreOptions() {
echo "The following configurations can be transferred into the new installation." echo "The following configurations can be transferred into the new installation."
echo "(SPACE = select/unselect a profile. RETURN = confirm. No selection = CANCEL)" echo "(SPACE = select/unselect a profile. RETURN = confirm. ESC/No selection = Skip Restore)"
echo "" echo ""
restorelist="" restorelist=""
if [ -f ~/dotfiles/.bashrc ]; then if [ -f ~/dotfiles/.bashrc ]; then
@ -75,18 +75,18 @@ _showRestoreOptions() {
echo "Selected to restore:" echo "Selected to restore:"
echo "$restoreselect" echo "$restoreselect"
echo "" echo ""
confirmrestore=$(gum choose "Start restore" "Change restore" "Cancel restore") confirmrestore=$(gum choose "Start restore" "Change restore" "Skip restore")
if [ "$confirmrestore" == "Start restore" ] ;then if [ "$confirmrestore" == "Start restore" ] ;then
_startRestore _startRestore
elif [ "$confirmrestore" == "Change restore" ]; then elif [ "$confirmrestore" == "Change restore" ]; then
_showRestoreOptions _showRestoreOptions
else else
echo "Restore skipped." echo ":: Restore skipped."
return 0 return 0
fi fi
else else
echo "No files selected to restore." echo "No files selected to restore."
confirmrestore=$(gum choose "Change restore" "Cancel restore") confirmrestore=$(gum choose "Change restore" "Skip restore")
if [ -z "${confirmrestore}" ] ;then if [ -z "${confirmrestore}" ] ;then
echo "Installation canceled." echo "Installation canceled."
exit exit
@ -95,7 +95,7 @@ _showRestoreOptions() {
echo "" echo ""
_showRestoreOptions _showRestoreOptions
else else
echo "Restore skipped." echo ":: Restore skipped."
return 0 return 0
fi fi
fi fi
@ -110,7 +110,7 @@ _startRestore() {
fi fi
if [[ $restoreselect == *"~/dotfiles/.settings"* ]] || [[ $restoreselect == *"All"* ]] ; then if [[ $restoreselect == *"~/dotfiles/.settings"* ]] || [[ $restoreselect == *"All"* ]] ; then
if [ -d ~/dotfiles/.settings ]; then if [ -d ~/dotfiles/.settings ]; then
rsync -a -I ~/dotfiles/.settings/ ~/dotfiles-versions/$version/.settings/ rsync -avhp -I ~/dotfiles/.settings/ ~/dotfiles-versions/$version/.settings/
echo ":: .settings restored!" echo ":: .settings restored!"
fi fi
fi fi
@ -189,7 +189,6 @@ _startRestore() {
} }
if [ -d ~/dotfiles ]; then if [ -d ~/dotfiles ]; then
echo -e "${GREEN}" echo -e "${GREEN}"
figlet "Restore" figlet "Restore"
echo -e "${NONE}" echo -e "${NONE}"

View File

@ -1,4 +1,15 @@
if [ "$restored" == "1" ]; then
echo -e "${GREEN}" echo -e "${GREEN}"
figlet "Restore Settings" figlet "Restore Settings"
echo -e "${NONE}" echo -e "${NONE}"
python .install/restore.py python .install/restore.py
else
if [ -f ~/dotfiles/.settings/settings.json ] ;then
rm ~/dotfiles/.settings/settings.json
echo ":: settings.json removed"
fi
if [ -f ~/.cache/.themestyle.sh ] ;then
rm ~/.cache/.themestyle.sh
echo ":: .themestyle.sh removed"
fi
fi

View File

@ -1 +1 @@
2.8.3RC2 2.8.3

View File

@ -1,4 +1,4 @@
# ML4W dotfiles 2.8.3 RC2 # ML4W dotfiles 2.8.3 RC3
An advanced configuration of Hyprland and Qtile for Arch Linux based distributions. This package includes an installation script to install and setup the required components. An advanced configuration of Hyprland and Qtile for Arch Linux based distributions. This package includes an installation script to install and setup the required components.