loose ends
This commit is contained in:
parent
10d3436c34
commit
79b737fed8
6 changed files with 29 additions and 3 deletions
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -1,5 +1,6 @@
|
||||||
sapphrc (1.0) UNRELEASED; urgency=medium
|
sapphrc (1.0) unstable; urgency=medium
|
||||||
|
|
||||||
* Initial release.
|
* Initial release.
|
||||||
|
*
|
||||||
|
|
||||||
-- Penelope Gwen <support@pogmom.me> Fri, 08 Mar 2024 11:49:45 -0700
|
-- Penelope Gwen <support@pogmom.me> Fri, 08 Mar 2024 11:49:45 -0700
|
||||||
|
|
1
debian/install
vendored
1
debian/install
vendored
|
@ -1,4 +1,3 @@
|
||||||
etc/bash_completion.d/spm etc/bash_completion.d/
|
|
||||||
lib/sapphrc/* lib/sapphrc/
|
lib/sapphrc/* lib/sapphrc/
|
||||||
usr/bin/* usr/bin/
|
usr/bin/* usr/bin/
|
||||||
usr/share/doc/sapphrc/* usr/share/doc/sapphrc/
|
usr/share/doc/sapphrc/* usr/share/doc/sapphrc/
|
||||||
|
|
Binary file not shown.
7
usr/bin/sapphrc_push
Normal file
7
usr/bin/sapphrc_push
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd "$HOME/.config/sapphrc/backups"
|
||||||
|
git add .;
|
||||||
|
git add -u;
|
||||||
|
git commit -m "New backup `date +'%Y-%m-%d %H:%M:%S'`";
|
||||||
|
git push origin main
|
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd "$HOME/.config/sapphrc/backups"
|
||||||
|
git pull --no-edit
|
||||||
|
|
||||||
sapphrc_config="$HOME/.config/sapphrc"
|
sapphrc_config="$HOME/.config/sapphrc"
|
||||||
|
|
||||||
cat "${sapphrc_config}/active_profiles" | while read profile_name
|
cat "${sapphrc_config}/active_profiles" | while read profile_name
|
||||||
|
|
18
usr/bin/sapphrc_updown
Normal file → Executable file
18
usr/bin/sapphrc_updown
Normal file → Executable file
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
sapphrc_restore
|
cd "$HOME/.config/sapphrc/backups"
|
||||||
sapphrc_backup
|
sapphrc_backup
|
||||||
|
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
|
||||||
|
elif [[ $gs == *"modified"* ]];then
|
||||||
|
#local changes exist
|
||||||
|
sapphrc_backup
|
||||||
|
elif [[ "${reslog}" == "" ]];then
|
||||||
|
#remote changes exist
|
||||||
|
sapphrc_restore
|
||||||
|
fi
|
||||||
|
exit
|
||||||
|
|
Loading…
Add table
Reference in a new issue