sapphrc/usr/bin/sapphrc_restore
Penelope Gwen 0fb8a165d1 v1.2
2024-04-09 00:36:06 -06:00

19 lines
634 B
Bash
Executable file

#!/bin/bash
source /lib/sapphrc/sapphrc-functions
source /lib/sapphrc/sapphrc-font
validate_backupdir
cd "$HOME/.config/sapphrc/backups"
git config pull.rebase false
git pull --no-edit
sapphrc_config="$HOME/.config/sapphrc"
cat "${sapphrc_config}/active_profiles" | while read profile_name
do
backup_homedir="$sapphrc_config/backups/${profile_name}/home"
include_list="$sapphrc_config/backups/${profile_name}/include"
exclude_list="$sapphrc_config/backups/${profile_name}/exclude"
rsync -arvSH --files-from="${include_list}" --exclude-from="${exclude_list}" --exclude '.config/sapphrc/' "${backup_homedir}" "${HOME}"
done