This commit is contained in:
Penelope Gwen 2024-04-09 00:36:06 -06:00
parent dbc11279e0
commit 0fb8a165d1
5 changed files with 17 additions and 8 deletions

6
debian/changelog vendored
View file

@ -1,3 +1,9 @@
sapphrc (1.2) unstable; urgency=medium
* fix some problematic synchronization (hopefully)
-- Penelope Gwen <support@pogmom.me> Tue, 09 Apr 2024 00:34:22 -0600
sapphrc (1.1) unstable; urgency=medium
* fixed broken updown logic

View file

@ -1 +1 @@
1.0
1.2

View file

@ -17,3 +17,5 @@ do
echo "${backup_homedir}"
rsync -arvSH --files-from="${include_list}" --exclude-from="${exclude_list}" --exclude '.config/sapphrc/' "${HOME}" "${backup_homedir}"
done
find ${HOME}/.config/sapphrc/backups/ -name *.swp -type f -exec rm {} \;

View file

@ -5,6 +5,7 @@ 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"

View file

@ -10,15 +10,15 @@ gs="$(git status | grep -i 'modified')"
git fetch origin
reslog=$(git log HEAD..origin/main --oneline)
if [[ "${gs}" == *"modified"* && "${reslog}" != "" ]];then
#local AND remote changes exist
echo "local backup reposity conflict with remote - please manually fix this!"
exit 1
echo $gs
echo " "
echo $reslog
if [[ "${reslog}" == "" ]];then
#remote changes exist
sapphrc_restore
elif [[ $gs == *"modified"* ]];then
#local changes exist
sapphrc_push
elif [[ "${reslog}" == "" ]];then
#remote changes exist
sapphrc_restore
fi
exit