diff --git a/debian/changelog b/debian/changelog index e738273..079c1c7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +sapphrc (1.2) unstable; urgency=medium + + * fix some problematic synchronization (hopefully) + + -- Penelope Gwen Tue, 09 Apr 2024 00:34:22 -0600 + sapphrc (1.1) unstable; urgency=medium * fixed broken updown logic diff --git a/lib/sapphrc/version b/lib/sapphrc/version index d3827e7..5625e59 100644 --- a/lib/sapphrc/version +++ b/lib/sapphrc/version @@ -1 +1 @@ -1.0 +1.2 diff --git a/usr/bin/sapphrc_backup b/usr/bin/sapphrc_backup index 8e58211..9f65b1a 100755 --- a/usr/bin/sapphrc_backup +++ b/usr/bin/sapphrc_backup @@ -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 {} \; diff --git a/usr/bin/sapphrc_restore b/usr/bin/sapphrc_restore index c22d130..d97e318 100755 --- a/usr/bin/sapphrc_restore +++ b/usr/bin/sapphrc_restore @@ -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" diff --git a/usr/bin/sapphrc_updown b/usr/bin/sapphrc_updown index 8594dc4..625e11e 100755 --- a/usr/bin/sapphrc_updown +++ b/usr/bin/sapphrc_updown @@ -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