Only try to sync repos that exist. Would sync the PWD otherwise

This commit is contained in:
Nemo 2020-05-16 00:56:21 +05:30
parent 7a426b9877
commit 3d27656b6b
1 changed files with 8 additions and 6 deletions

View File

@ -3,11 +3,13 @@
PATH=$PATH:/home/nemo/projects/scripts/ PATH=$PATH:/home/nemo/projects/scripts/
function sync_repo() { function sync_repo() {
pushd $1 if [[ -d "$1" ]]; then
git config --bool branch.master.sync true pushd $1
git config --bool branch.master.syncNewFiles true git config --bool branch.master.sync true
git-sync git config --bool branch.master.syncNewFiles true
popd git-sync
popd
fi
} }
# xpad-notes # xpad-notes
@ -24,4 +26,4 @@ sync_repo /home/nemo/projects/personal/mobile-passwords
# scripts?: NO # scripts?: NO
# imapfilter: YES # imapfilter: YES
# /etc: YES # /etc: YES
# dotfiles: NO # dotfiles: NO