Updates
This commit is contained in:
parent
b4e291cc74
commit
001527ba1c
@ -8,7 +8,7 @@ monitorrestored=0
|
||||
|
||||
_showRestoreOptions() {
|
||||
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 ""
|
||||
restorelist=""
|
||||
if [ -f ~/dotfiles/.bashrc ]; then
|
||||
@ -75,18 +75,18 @@ _showRestoreOptions() {
|
||||
echo "Selected to restore:"
|
||||
echo "$restoreselect"
|
||||
echo ""
|
||||
confirmrestore=$(gum choose "Start restore" "Change restore" "Cancel restore")
|
||||
confirmrestore=$(gum choose "Start restore" "Change restore" "Skip restore")
|
||||
if [ "$confirmrestore" == "Start restore" ] ;then
|
||||
_startRestore
|
||||
elif [ "$confirmrestore" == "Change restore" ]; then
|
||||
_showRestoreOptions
|
||||
else
|
||||
echo "Restore skipped."
|
||||
echo ":: Restore skipped."
|
||||
return 0
|
||||
fi
|
||||
else
|
||||
echo "No files selected to restore."
|
||||
confirmrestore=$(gum choose "Change restore" "Cancel restore")
|
||||
confirmrestore=$(gum choose "Change restore" "Skip restore")
|
||||
if [ -z "${confirmrestore}" ] ;then
|
||||
echo "Installation canceled."
|
||||
exit
|
||||
@ -95,7 +95,7 @@ _showRestoreOptions() {
|
||||
echo ""
|
||||
_showRestoreOptions
|
||||
else
|
||||
echo "Restore skipped."
|
||||
echo ":: Restore skipped."
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
@ -110,7 +110,7 @@ _startRestore() {
|
||||
fi
|
||||
if [[ $restoreselect == *"~/dotfiles/.settings"* ]] || [[ $restoreselect == *"All"* ]] ; 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!"
|
||||
fi
|
||||
fi
|
||||
@ -189,10 +189,9 @@ _startRestore() {
|
||||
}
|
||||
|
||||
if [ -d ~/dotfiles ]; then
|
||||
|
||||
echo -e "${GREEN}"
|
||||
figlet "Restore"
|
||||
echo -e "${NONE}"
|
||||
echo -e "${GREEN}"
|
||||
figlet "Restore"
|
||||
echo -e "${NONE}"
|
||||
restored=0
|
||||
echo "The script will try to restore existing configurations."
|
||||
echo "PLEASE NOTE: Restoring is not possible with version < 2.6 of the dotfiles."
|
||||
|
@ -1,4 +1,15 @@
|
||||
echo -e "${GREEN}"
|
||||
figlet "Restore Settings"
|
||||
echo -e "${NONE}"
|
||||
python .install/restore.py
|
||||
if [ "$restored" == "1" ]; then
|
||||
echo -e "${GREEN}"
|
||||
figlet "Restore Settings"
|
||||
echo -e "${NONE}"
|
||||
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
|
@ -1 +1 @@
|
||||
2.8.3RC2
|
||||
2.8.3
|
Loading…
x
Reference in New Issue
Block a user